Trim whitespace from final project/subproject

i had 'HW ' come in as a complete surprise not-converted-to-HousingWorks
'unknown' entry.
This commit is contained in:
benjamin melançon 2024-06-20 18:44:13 -04:00
parent 666567bd14
commit a16e50063e

View file

@ -165,6 +165,10 @@ for preferred, alternatives in compound_project_tasks.items():
timelog['subproject'] = (np.where(timelog['project'].str.contains(''), timelog['project'].str.split('', n=1).str[1], None)) timelog['subproject'] = (np.where(timelog['project'].str.contains(''), timelog['project'].str.split('', n=1).str[1], None))
timelog['project'] = (np.where(timelog['project'].str.contains(''), timelog['project'].str.split('', n=1).str[0], timelog['project'])) timelog['project'] = (np.where(timelog['project'].str.contains(''), timelog['project'].str.split('', n=1).str[0], timelog['project']))
# Trim any surrounding whitespace from final project and sub-project/task.
timelog['subproject'] = timelog['subproject'].str.strip()
timelog['project'] = timelog['project'].str.strip()
# Replace irregular-but-known project names with ones timetracking tools use. # Replace irregular-but-known project names with ones timetracking tools use.
harvest_project_names = { harvest_project_names = {
"Everyday AI Project": ["EverydayAI", "MIT Scheller Teacher Education Program (STEP) Lab", "Education Arcade", "Everyday AI", "Everday AI", "EA"], "Everyday AI Project": ["EverydayAI", "MIT Scheller Teacher Education Program (STEP) Lab", "Education Arcade", "Everyday AI", "Everday AI", "EA"],