python-tabulate icon indicating copy to clipboard operation
python-tabulate copied to clipboard

Update _isnumber to ensure the output string convertible to float

Open zhihanyue opened this issue 2 years ago • 1 comments

The numpy.datetime64[ns] was recognized as float, because numpy.datetime64[ns] is convertible to float. This PR fixes this problem.

Fix #251

zhihanyue avatar Feb 17 '23 06:02 zhihanyue

While this PR may solve the issue with numpy.datetime64, it does not go far enough to also fix incorrect conversions of strings to float, e.g. "1E10" becomes 1e+10. See issue #266 I still think this PR can go forward, I just wanted to mention it.

Update: I discovered disable_numparse=True which solves that issue ... never mind ...

andy-maier avatar May 11 '23 12:05 andy-maier