dmnfarrell / pandastable

Table analysis in Tkinter using pandas DataFrames.
Other
617 stars 127 forks source link

How to set float formatting using config preferences #214

Closed sandsmichael closed 2 years ago

sandsmichael commented 2 years ago

Is this functionality supported? I see that there is a decimal place precision option, but I want to comma separate the numbers in my table while still retaining the ability to sort by column values on the table itself. Is this possible?

I do not see an example of this here: https://pandastable.readthedocs.io/en/latest/examples.html#set-preferences

dmnfarrell commented 2 years ago

You mean you want thousands shown with a comma?

sandsmichael commented 2 years ago

Yes. Ideally, 1000000.0 would appear in the table as 1,000,000.0 but the columns of the table itself would remain sortable. Currently, if I string format the numbers before populating them into the table they obviously sort as strings instead of as floats.

dmnfarrell commented 2 years ago

There is now a thousands sep option in the preferences. See if this works.