Keep our strings from being ragged

This commit is contained in:
benjamin melançon 2021-04-28 11:05:02 -04:00
parent 9faa5c44c4
commit 9e97b6b250

View file

@ -39,8 +39,9 @@ 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['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'])) timelog['description'] = (np.where(timelog['description'].str.contains(': '), timelog['description'].str.split(': ', 1).str[1], timelog['description']))
# Mid-work clean up of description. # Mid-work clean up of description and new project.
timelog['description'] = timelog['description'].str.strip() timelog['description'] = timelog['description'].str.strip()
timelog['project'] = timelog['project'].str.strip()
# If a multiplier has been provided (an asterisk and an integer at the end of a # 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. # task), then multiply the time by it and remove it from the description.