Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

String "1E10" is incorrectly formatted as float #266

Closed
andy-maier opened this issue May 11, 2023 · 1 comment
Closed

String "1E10" is incorrectly formatted as float #266

andy-maier opened this issue May 11, 2023 · 1 comment

Comments

@andy-maier
Copy link
Contributor

andy-maier commented May 11, 2023

With tabulate 0.9.0 on Python 3.9:

$ python -c "from tabulate import tabulate; print(tabulate([['1E10']]))"
-----
1e+10
-----

When the value goes beyond a certain limit (the upper limit for 64-bit Python float), it accepts that it is a string:

$ python -c "from tabulate import tabulate; print(tabulate([['1E308']]))"
------
1e+308
------

$ python -c "from tabulate import tabulate; print(tabulate([['1E309']]))"
-----
1E309
-----
@andy-maier
Copy link
Contributor Author

Ok, I discovered disable_numparse=True, which addresses this. Closing this issue as invalid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant