Private
Public Access
1
0

fixed some workoutstate errors

This commit is contained in:
Sander Roosendaal
2020-04-13 13:39:31 +02:00
parent 61a10a1dfa
commit d2fb2274f4
3 changed files with 14 additions and 0 deletions

View File

@@ -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: