Provide first started and last recorded times for each task
This commit is contained in:
parent
a42dd0b5e2
commit
afbb5dbe1e
1 changed files with 3 additions and 2 deletions
|
@ -12,5 +12,6 @@ timelog["time"] = 30
|
||||||
timelog["date"] = timelog["started"].dt.tz_convert("US/Pacific").dt.date
|
timelog["date"] = timelog["started"].dt.tz_convert("US/Pacific").dt.date
|
||||||
timelog["day_of_week"] = pd.to_datetime(timelog["date"]).dt.day_name()
|
timelog["day_of_week"] = pd.to_datetime(timelog["date"]).dt.day_name()
|
||||||
|
|
||||||
# Condense duplicate entries by date, summing the minutes spent.
|
# Condense duplicate entries by date, summing the minutes spent, and listing
|
||||||
tl = timelog.groupby(["date", "description"]).agg({"time": ['sum']}, {"started": ['max']}).reset_index()
|
# the first started and last recorded times for each task.
|
||||||
|
tl = timelog.groupby(["date", "description"]).agg({"time": 'sum', "started": 'min', "recorded": 'max'}).reset_index()
|
||||||
|
|
Loading…
Reference in a new issue