Restore simple, clean, grouping/aggregation that does in fact work
This commit is contained in:
parent
5bd5ba3aeb
commit
88504f6881
1 changed files with 1 additions and 2 deletions
|
@ -160,8 +160,7 @@ timelog['project'] = (np.where(timelog['project'].str.contains(': '), timelog['p
|
||||||
# Condense duplicate entries by date, summing the minutes spent, and listing
|
# Condense duplicate entries by date, summing the minutes spent, and listing
|
||||||
# the first started and last recorded times for each task.
|
# the first started and last recorded times for each task.
|
||||||
# The fillna is essential or we drop entries with blank ('None') projects.
|
# The fillna is essential or we drop entries with blank ('None') projects.
|
||||||
timelogMI = pd.MultiIndex.from_frame(timelog)
|
tl = timelog.groupby(["date", timelog.project.fillna(""), timelog.subproject.fillna("Development"), "description"]).agg({"time": 'sum', "started": 'min', "recorded": 'max'}).reset_index()
|
||||||
tl = timelogMI.groupby(["date", timelog.subproject.fillna("Development"), timelog.project.fillna(""), "description"]).agg({"time": 'sum', "started": 'min', "recorded": 'max'}).reset_index()
|
|
||||||
|
|
||||||
# We're doing the final conversion to Harvest as a separate step because we
|
# We're doing the final conversion to Harvest as a separate step because we
|
||||||
# want to factor out all of the above non-Harvest-specific logic.
|
# want to factor out all of the above non-Harvest-specific logic.
|
||||||
|
|
Loading…
Reference in a new issue