Private
Public Access
1
0

trying to fix some bugs

This commit is contained in:
Sander Roosendaal
2020-03-18 22:52:02 +01:00
parent c7e7bbb5ce
commit ec4e5722cd
2 changed files with 4 additions and 1 deletions

View File

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