From 761d04204a134546917a75aae15c2a1262ec9e13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?benjamin=20melan=C3=A7on?= Date: Wed, 28 Apr 2021 11:08:43 -0400 Subject: [PATCH] Output all entries, reset index for fun, and write out our CSV file --- pomodoro_to_harvest.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pomodoro_to_harvest.py b/pomodoro_to_harvest.py index 1d10532..77af53e 100644 --- a/pomodoro_to_harvest.py +++ b/pomodoro_to_harvest.py @@ -57,4 +57,6 @@ timelog['description'] = timelog['description'].str.strip() # Condense duplicate entries by date, summing the minutes spent, and listing # the first started and last recorded times for each task. -tl = timelog.groupby(["date", "project", "description"]).agg({"time": 'sum', "started": 'min', "recorded": 'max'}).reset_index() +tl = timelog.groupby(["date", timelog.project.fillna(""), "description"]).agg({"time": 'sum', "started": 'min', "recorded": 'max'}).reset_index() + +tl.to_csv('harvest-ready.csv', index = False)