Private
Public Access
1
0
This commit is contained in:
2024-04-10 22:34:53 +02:00
parent eccb20b82f
commit ef8054b5a6
2 changed files with 14 additions and 1 deletions

View File

@@ -1981,7 +1981,20 @@ def dataplep(rowdatadf, id=0, inboard=0.88, forceunit='lbs', bands=True, barchar
if rowdatadf.empty:
return 0
df = pl.from_pandas(rowdatadf)
try:
df = pl.from_pandas(rowdatadf)
except ArrowInvalid:
for k, v in dtypes.items():
try:
rowdatadf[k] = rowdatadf[k].astype(v)
except KeyError: # pragma: no cover
pass
try:
df = pl.from_pandas(rowdatadf)
except ArrowInvalid:
return dataprep(rowdatadf, id=id, inboard=inboard, forceunit=forceunit, bands=bands, barchart=barchart,
otwpower=otwpower, debug=debug,polars=True)
df = df.with_columns((pl.col("TimeStamp (sec)")-df[0, "TimeStamp (sec)"]).alias("TimeStamp (sec)"))
df = df.with_columns((pl.col(" Stroke500mPace (sec/500m)").clip(1,3000)).alias(" Stroke500mPace"))

Binary file not shown.