Kanaries / pygwalker

PyGWalker: Turn your pandas dataframe into an interactive UI for visual analysis
https://kanaries.net/pygwalker
Apache License 2.0
11.12k stars 579 forks source link

Simplified JSON encoder for handling Decimal types #425

Closed blondon1 closed 7 months ago

blondon1 commented 7 months ago

It checks if the object is an instance of Decimal and returns its float representation directly, this change simplifies the code by removing unnecessary checks

longxiaofei commented 7 months ago

Decimal.nan will be parsed as Nan in the json string. Some front-end components are not suitable for Nan.