Open giuliobeseghi opened 4 years ago
This could also (and more simply) be achieved with
df.date + df.date.dt.freq
if dt.freq
returned an offset object instead of a str
Could I work on this if no one is already? I can investigate the two proposed solutions and report back.
Code Sample, a copy-pastable example if possible
Problem description
I always thought that the
dt
accessor should replicate more or less the functionality of a DatetimeIndex to a series or a column of a dataframe. If I can do it with a DatetimeIndex, I should be able to do it with a collection of datetimes too, right?Expected Output
This is my workaround to obtain the expected output. It's not very nice.
Output of
pd.show_versions()