Document making .contains not a regular expression
This commit is contained in:
parent
f31c9d4d47
commit
2516b9272d
1 changed files with 2 additions and 0 deletions
|
@ -20,6 +20,8 @@ timelog['description'] = (np.where(timelog['description'].str.contains(': '), ti
|
|||
|
||||
# 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.
|
||||
# Note that contains is regex by default, so we actually have to specify pattern
|
||||
# and regex false to check if it contains an asterisk!
|
||||
timelog['tmp_multiplier'] = (np.where(timelog['description'].str.contains(pat='*', regex=False), timelog['description'].str.split('*', 1).str[1], None))
|
||||
timelog['description'] = (np.where(timelog['description'].str.contains(pat='*', regex=False), timelog['description'].str.split('*', 1).str[0], timelog['description']))
|
||||
|
||||
|
|
Loading…
Reference in a new issue