tested
This commit is contained in:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user