Selaa lähdekoodia

Fix too long integer for `Table`. (#4651)

### What problem does this PR solve?

#4594

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
tags/v0.16.0
Kevin Hu 9 kuukautta sitten
vanhempi
commit
c24137bd11
No account linked to committer's email address
1 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. 2
    2
      rag/app/table.py

+ 2
- 2
rag/app/table.py Näytä tiedosto

@@ -102,9 +102,9 @@ def column_data_type(arr):
for a in arr:
if a is None:
continue
if re.match(r"[+-]?[0-9]+(\.0+)?$", str(a).replace("%%", "")):
if re.match(r"[+-]?[0-9]{,19}(\.0+)?$", str(a).replace("%%", "")):
counts["int"] += 1
elif re.match(r"[+-]?[0-9.]+$", str(a).replace("%%", "")):
elif re.match(r"[+-]?[0-9.]{,19}$", str(a).replace("%%", "")):
counts["float"] += 1
elif re.match(r"(true|yes|是|\*|✓|✔|☑|✅|√|false|no|否|⍻|×)$", str(a), flags=re.IGNORECASE):
counts["bool"] += 1

Loading…
Peruuta
Tallenna