fixed some workoutstate errors
This commit is contained in:
@@ -512,6 +512,12 @@ def clean_df_stats(datadf, workstrokesonly=True, ignorehr=True,
|
||||
except (KeyError,TypeError) as e:
|
||||
pass
|
||||
|
||||
# protect 0 workoutstate values from being nulled
|
||||
try:
|
||||
datadf['workoutstate'] = datadf['workoutstate'] + 1
|
||||
except (KeyError,TypeError) as e:
|
||||
pass
|
||||
|
||||
|
||||
try:
|
||||
datadf = datadf.clip(lower=0)
|
||||
@@ -545,6 +551,12 @@ def clean_df_stats(datadf, workstrokesonly=True, ignorehr=True,
|
||||
except (TypeError,KeyError) as e:
|
||||
pass
|
||||
|
||||
# bring workoutstate back to real values
|
||||
try:
|
||||
datadf['workoutstate'] = datadf['workoutstate'] - 1
|
||||
except (TypeError,KeyError) as e:
|
||||
pass
|
||||
|
||||
|
||||
# return from positive domain to negative
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user