Private
Public Access
1
0
This commit is contained in:
2024-11-26 19:40:10 +01:00
parent a8973b80b1
commit 029dddd1db
5 changed files with 42 additions and 9 deletions

View File

@@ -176,6 +176,7 @@ columndict = {
'slip': 'slip',
'workoutstate': ' WorkoutState',
'cumdist': 'cum_dist',
'check_factor': 'check_factor',
}
@@ -1599,6 +1600,10 @@ def read_data(columns, ids=[], doclean=True, workstrokesonly=True, debug=False,
try:
datadf = pl.concat(data).select(columns)
except ColumnNotFoundError:
datadf = pl.concat(data)
existing_columns = [col for col in columns if col in datadf.columns]
datadf = datadf.select(existing_columns)
except (ShapeError, SchemaError):
data = [
df.select(columns)
@@ -2302,6 +2307,16 @@ def dataplep(rowdatadf, id=0, inboard=0.88, forceunit='lbs', bands=True, barchar
hr_bottom = 0.0*df[' HRCur (bpm)'],
)
if 'check_factor' not in df.columns:
data = data.with_columns(
check_factor = pl.lit(0.0),
)
else:
data = data.with_columns(
check_factor = df['check_factor'],
)
if 'wash' not in df.columns:
data = data.with_columns(
wash = pl.lit(0.0),