OK wow lot harder to remove value from column than expected
This commit is contained in:
parent
99b4d47e3c
commit
8cb00bf086
1 changed files with 3 additions and 0 deletions
|
@ -105,6 +105,9 @@ for days, phrases in timeshift_days.items():
|
|||
timelog.loc[timelog.tmp_timeshift.str.lower().isin(phrases), "tmp_daysdelta"] = int(days)
|
||||
timelog['tmp_daysdelta'] = timelog['tmp_daysdelta'].fillna(0)
|
||||
timelog['date'] = timelog['date'] + pd.to_timedelta(timelog['tmp_daysdelta'], unit='D')
|
||||
timelog.tmp_timeshift = '(' + timelog.tmp_timeshift + ')'
|
||||
# timelog['description'] = (np.where(timelog['tmp_daysdelta'] > 0.0, timelog['description'].str.replace(timelog['tmp_timeshift'], ""), timelog['description']))
|
||||
timelog.description.replace(regex=r'(?i)' + timelog.tmp_timeshift, value="")
|
||||
|
||||
# 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.
|
||||
|
|
Loading…
Reference in a new issue