astanin / python-tabulate

Pretty-print tabular data in Python, a library and a command-line utility. Repository migrated from bitbucket.org/astanin/python-tabulate.
https://pypi.org/project/tabulate/
MIT License
2.1k stars 163 forks source link

Treat empty strings as generic for column type deduction, allow thousands separators #243

Open pjkundert opened 1 year ago

pjkundert commented 1 year ago

Allow missing (None) and empty ("") cells to be treated the same, for the purposes of deducing the column type.

This allows us to have empty cells (without the missingval), differentiated from missing cells (with the missingval), for columns generally containing numeric data, while retaining the correctly deduced column formatting.

Resolves #242

eliegoudout commented 1 year ago

I think you should split your PR in two:

Indeed, merging the fix should not be conditional to accepting/merging your proposed modification.

pjkundert commented 1 year ago

OK, removed SEPARATING_LINE fix.

Now, deals in deduction of int and float columns, and supports thousands-separators in ints, floats.