added check if dataframe is not empty to Empower force curve
This commit is contained in:
@@ -154,6 +154,8 @@ def interactive_forcecurve(theworkouts,workstrokesonly=False):
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
if rowdata.empty:
|
||||
return "","No Valid Data Available","",""
|
||||
|
||||
catchav = rowdata['catch'].mean()
|
||||
finishav = rowdata['finish'].mean()
|
||||
@@ -348,7 +350,7 @@ def interactive_forcecurve(theworkouts,workstrokesonly=False):
|
||||
slider_spm_max = Slider(start=15.0, end=55,value=55.0, step=.1,
|
||||
title="Max SPM",callback=callback)
|
||||
callback.args["maxspm"] = slider_spm_max
|
||||
|
||||
|
||||
distmax = 100+100*int(rowdata['distance'].max()/100.)
|
||||
|
||||
slider_dist_min = Slider(start=0,end=distmax,value=0,step=1,
|
||||
@@ -386,6 +388,9 @@ def interactive_histoall(theworkouts):
|
||||
rowdata = dataprep.getsmallrowdata_db(['power'],ids=ids,doclean=True)
|
||||
rowdata.dropna(axis=0,how='any',inplace=True)
|
||||
|
||||
if rowdata.empty:
|
||||
return "","No Valid Data Available","",""
|
||||
|
||||
histopwr = rowdata['power'].values
|
||||
if len(histopwr) == 0:
|
||||
return "","No valid data available","",""
|
||||
|
||||
Reference in New Issue
Block a user