Update table.py to convert clmns to string (#414)

### What problem does this PR solve?


### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
YC 2024-04-17 19:48:11 +08:00 committed by GitHub
parent dd7559a009
commit e8570da856
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -199,7 +199,7 @@ def chunk(filename, binary=None, from_page=0, to_page=10000000000,
re.sub( re.sub(
r"(/.*|[^]+?|\([^()]+?\))", r"(/.*|[^]+?|\([^()]+?\))",
"", "",
n), str(n)),
'_')[0] for n in clmns] '_')[0] for n in clmns]
clmn_tys = [] clmn_tys = []
for j in range(len(clmns)): for j in range(len(clmns)):
@ -208,7 +208,7 @@ def chunk(filename, binary=None, from_page=0, to_page=10000000000,
df[clmns[j]] = cln df[clmns[j]] = cln
if ty == "text": if ty == "text":
txts.extend([str(c) for c in cln if c]) txts.extend([str(c) for c in cln if c])
clmns_map = [(py_clmns[i].lower() + fieds_map[clmn_tys[i]], clmns[i].replace("_", " ")) clmns_map = [(py_clmns[i].lower() + fieds_map[clmn_tys[i]], str(clmns[i]).replace("_", " "))
for i in range(len(clmns))] for i in range(len(clmns))]
eng = lang.lower() == "english" # is_english(txts) eng = lang.lower() == "english" # is_english(txts)