From a42dd0b5e2335698ae298f11f8d166db372bb347 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?benjamin=20melan=C3=A7on?= Date: Tue, 27 Apr 2021 14:32:01 -0400 Subject: [PATCH] Don't overwrite timelog. Max for started isn't working here, weirdly --- pomodoro_to_harvest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pomodoro_to_harvest.py b/pomodoro_to_harvest.py index 7fa57cb..bb9be5d 100644 --- a/pomodoro_to_harvest.py +++ b/pomodoro_to_harvest.py @@ -13,4 +13,4 @@ timelog["date"] = timelog["started"].dt.tz_convert("US/Pacific").dt.date timelog["day_of_week"] = pd.to_datetime(timelog["date"]).dt.day_name() # Condense duplicate entries by date, summing the minutes spent. -timelog = timelog.groupby(["date", "description"]).agg({"time": ['sum']}) +tl = timelog.groupby(["date", "description"]).agg({"time": ['sum']}, {"started": ['max']}).reset_index()