plotly / dash-table-experiments

NO LONGER SUPPORTED - use https://github.com/plotly/dash-table instead
MIT License
174 stars 57 forks source link

Adding comma number formatting or get filtering to work with comma separated strings #17

Open nmiculinic opened 6 years ago

nmiculinic commented 6 years ago

I'd like to see big numbers (e.g. 100,000,100.123124421) being comma delimited by the thousands.

How can I achieve that?

josesho commented 6 years ago

not sure what your data looks like, but if you're using dash_table_experiments to displaypandas DataFrames, you can apply a custom formatting function to relevant columns before passing the DataFrame to DataTable.

Hope this helps!

nmiculinic commented 6 years ago

That's fine, except data is then transformed to string, and not filterable anymore (with comparison operators, that is <2, >5 aren't working anymore)

josesho commented 6 years ago

is the range of your numbers large or small? (i.e. could be from 1 to 10 million?) If the range isn't too big, you could consider either a log-transform, or simply expressing everything in millions or thousands.

I suppose having an Excel-like display for large numbers would be nice, but it seems you'd have to hack either the underlying adazzle React data grid to achieve that.... and the React data grid doesn't seem to have any documentation regarding that?

deepakagrawal commented 5 years ago

It might be great to add option of formatting column as percentage, changing decimal numbers (similar to excel)