Start to use our multiplier to have time be x times what we give

This commit is contained in:
benjamin melançon 2021-04-27 22:30:38 -04:00
parent 3921d6774f
commit f31c9d4d47

View file

@ -18,6 +18,10 @@ timelog["day_of_week"] = pd.to_datetime(timelog["date"]).dt.day_name()
timelog['project'] = (np.where(timelog['description'].str.contains(': '), timelog['description'].str.split(': ', 1).str[0], None))
timelog['description'] = (np.where(timelog['description'].str.contains(': '), timelog['description'].str.split(': ', 1).str[1], timelog['description']))
# If a multiplier has been provided (an asterisk and an integer at the end of a
# task), then multiply the time by it and remove it from the description.
timelog['tmp_multiplier'] = (np.where(timelog['description'].str.contains(pat='*', regex=False), timelog['description'].str.split('*', 1).str[1], None))
timelog['description'] = (np.where(timelog['description'].str.contains(pat='*', regex=False), timelog['description'].str.split('*', 1).str[0], timelog['description']))
# Condense duplicate entries by date, summing the minutes spent, and listing
# the first started and last recorded times for each task.