Start conversion to Harvest column titles

This commit is contained in:
benjamin melançon 2021-06-02 05:58:42 -04:00
parent 6997b7ebea
commit 0b61f165e3

View file

@ -166,13 +166,15 @@ tl = timelog.groupby(["date", timelog.project.fillna(""), "description"]).agg({"
latest = tl.recorded.max() latest = tl.recorded.max()
# Filter out any blank projects and any projects we know are not in Harvest. # Separate Harvest from non-Harvest projects, and also filter out any blank
# We also do the opposite to get a CSV of the excluded items. # projects, but save those too for a CSV of the excluded items.
non_harvest_list = ["", "Personal", "Near North camp"]
harvest = tl[tl.project.isin(harvest_project_names.keys())] harvest = tl[tl.project.isin(harvest_project_names.keys())]
other = tl[tl.project.isin(other_project_names.keys())] other = tl[tl.project.isin(other_project_names.keys())]
unknown = tl[~tl.project.isin(replacement_project_names.keys())] unknown = tl[~tl.project.isin(replacement_project_names.keys())]
harvest.rename(columns = {'date': 'Date', 'project': 'Project', 'description': 'Note'}, inplace = True)
harvest["First name"] = "Benjamin"
harvest["Last name"] = "Melançon"
if not debug: if not debug:
harvest.to_csv('harvest-timesheets.csv', index=False) harvest.to_csv('harvest-timesheets.csv', index=False)