Document code
This commit is contained in:
parent
f51acf4fec
commit
3921d6774f
1 changed files with 2 additions and 0 deletions
|
@ -13,6 +13,8 @@ timelog["time"] = 30
|
|||
timelog["date"] = timelog["started"].dt.tz_convert("US/Pacific").dt.date
|
||||
timelog["day_of_week"] = pd.to_datetime(timelog["date"]).dt.day_name()
|
||||
|
||||
# If a project has been specified (task prefixed with a colon), then put the
|
||||
# project in its own column.
|
||||
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']))
|
||||
|
||||
|
|
Loading…
Reference in a new issue