From 7102c3876f3a74a03a50c72d8e152e8782116105 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Melan=C3=A7on?= Date: Sat, 18 Dec 2021 00:04:52 -0500 Subject: [PATCH] Ensure date is a datetime not just an object This mostly doesn't even matter but it prevents this warning when adding the delta: PerformanceWarning: Adding/subtracting object-dtype array to TimedeltaArray not vectorized --- pomodoro_to_harvest.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pomodoro_to_harvest.py b/pomodoro_to_harvest.py index b4c5967..3d4af24 100644 --- a/pomodoro_to_harvest.py +++ b/pomodoro_to_harvest.py @@ -78,6 +78,7 @@ timelog["time"] = 30 # of the day before, so we are, effectively, on West Coast time for determining # the day we want to associate a time entry with. PomodoroPrompt saves as UTC. timelog["date"] = timelog["started"].dt.tz_convert("US/Pacific").dt.date +timelog['date'] = pd.to_datetime(timelog['date']) timelog["day_of_week"] = pd.to_datetime(timelog["date"]).dt.day_name() # If a project has been specified (task prefixed with a colon), then put the