trying to fix some bugs
This commit is contained in:
@@ -318,6 +318,7 @@ def trendflexdata(workouts, options,userid=0):
|
||||
datadf['date'].replace(datemapping,inplace=True)
|
||||
|
||||
today = datetime.date.today()
|
||||
|
||||
datadf['days ago'] = list(map(lambda x : x.days, datadf.date - today))
|
||||
|
||||
|
||||
@@ -648,6 +649,8 @@ def boxplotdata(workouts,options):
|
||||
|
||||
datadf['workoutid'].replace(datemapping,inplace=True)
|
||||
datadf.rename(columns={"workoutid":"date"},inplace=True)
|
||||
datadf['date'] = pd.to_datetime(datadf['date'],errors='coerce')
|
||||
datadf = datadf.dropna(subset=['date'])
|
||||
datadf = datadf.sort_values(['date'])
|
||||
|
||||
if userid == 0:
|
||||
|
||||
Reference in New Issue
Block a user