Pretty-print tabular data in Python, a library and a command-line utility. Repository migrated from bitbucket.org/astanin/python-tabulate.
2.19k
stars
165
forks
source link
bug: Error when I print a table with colored data #289
Open
Adamou02 opened 1 year ago
Description
I colorized my float with basic Python feature :
After few manipulations, I put these floats in a column of my Pandas Dataframe.
Works well :
Header are not well positioned, but Pd dataframe works well.
Then, I print the table with tabulate module.
Error occurs here :
ValueError: could not convert string to float: '\x1b[31m965.3344\x1b[0m'
Reproduce
Use a column with formated data. In my case this row :
Expected behavior
With numbers in column "reference" print in red.
Context