fixing the fix
This commit is contained in:
@@ -546,9 +546,10 @@ def clean_df_stats(datadf, workstrokesonly=True, ignorehr=True,
|
||||
ignoreadvanced=False):
|
||||
# clean data remove zeros and negative values
|
||||
|
||||
|
||||
try:
|
||||
workoutids = datadf['workoutid'].unqiue()
|
||||
except (KeyError,AttributeError):
|
||||
workoutids = datadf['workoutid'].unique()
|
||||
except KeyError:
|
||||
datadf['workoutid'] = 0
|
||||
|
||||
before = {}
|
||||
@@ -802,9 +803,9 @@ def clean_df_stats(datadf, workstrokesonly=True, ignorehr=True,
|
||||
after = {}
|
||||
for workoutid in data_orig['workoutid'].unique():
|
||||
after[workoutid] = len(datadf[datadf['workoutid']==workoutid].dropna())
|
||||
|
||||
ratio = float(after[workoutid])/float(before[workoutid])
|
||||
|
||||
|
||||
|
||||
if ratio < 0.01 or after < 2:
|
||||
return data_orig
|
||||
|
||||
|
||||
Reference in New Issue
Block a user