We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b4e5a14 + 5fb1fcd commit d2668bdCopy full SHA for d2668bd
tabulate.py
@@ -595,8 +595,16 @@ def _isnumber(string):
595
False
596
>>> _isnumber("inf")
597
True
598
+ >>> _isnumber("1,234.56")
599
+ True
600
+ >>> _isnumber("1,234,578.0")
601
602
"""
- if not _isconvertible(float, string):
603
+ if isinstance(string, (_text_type)) and "," in string and (
604
+ _isconvertible(float, string.replace(",",""))
605
+ ):
606
+ return True
607
+ elif not _isconvertible(float, string):
608
return False
609
elif isinstance(string, (_text_type, _binary_type)) and (
610
math.isinf(float(string)) or math.isnan(float(string))
0 commit comments