Private
Public Access
1
0
This commit is contained in:
2024-09-25 21:24:05 +02:00
parent ae52724a00
commit e4b5190146
3 changed files with 11 additions and 9 deletions

View File

@@ -433,14 +433,16 @@ def trendflexdata(workouts, options, userid=0):
yerror = []
groupsize = []
groupval = []
for key, item in groups:
xvalues.append(groups.get_group(key)[xparam].mean())
yvalues.append(groups.get_group(key)[yparam].mean())
xerror.append(groups.get_group(key)[xparam].std())
yerror.append(groups.get_group(key)[yparam].std())
groupsize.append(len(groups.get_group(key)[xparam]))
groupval.append(groups.get_group(key)[groupby].mean())
try:
for key, item in groups:
xvalues.append(groups.get_group(key)[xparam].mean())
yvalues.append(groups.get_group(key)[yparam].mean())
xerror.append(groups.get_group(key)[xparam].std())
yerror.append(groups.get_group(key)[yparam].std())
groupsize.append(len(groups.get_group(key)[xparam]))
groupval.append(groups.get_group(key)[groupby].mean())
except TypeError:
return('','Error: Unable to compute data')
xvalues = pd.Series(xvalues)
yvalues = pd.Series(yvalues)