Private
Public Access
1
0
This commit is contained in:
2024-11-19 16:08:26 +01:00
parent 3b499be407
commit 4562ba7de4
2 changed files with 18 additions and 15 deletions

View File

@@ -1619,21 +1619,24 @@ def read_data(columns, ids=[], doclean=True, workstrokesonly=True, debug=False,
stringcolumns.append(c)
else:
intcolumns.append(c)
data = [
df.with_columns(
cs.float().cast(pl.Float64)
).with_columns(
cs.integer().cast(pl.Int64)
).with_columns(
cs.by_name(intcolumns).cast(pl.Int64)
).with_columns(
cs.by_name(floatcolumns).cast(pl.Float64)
).with_columns(
cs.by_name(stringcolumns).cast(pl.String)
)
for df in data
]
try:
data = [
df.with_columns(
cs.float().cast(pl.Float64)
).with_columns(
cs.integer().cast(pl.Int64)
).with_columns(
cs.by_name(intcolumns).cast(pl.Int64)
).with_columns(
cs.by_name(floatcolumns).cast(pl.Float64)
).with_columns(
cs.by_name(stringcolumns).cast(pl.String)
)
for df in data
]
except ComputeError:
pass
try:
datadf = pl.concat(data)

Binary file not shown.