Suppose I have a pandas Timestamp object t1.
import pandas a pd
t1=pd.Timestamp('2013-04-01 00:00:00')
How can I get another pandas timestamp, offset by k months from t1?
Suppose I have a pandas Timestamp object t1.
import pandas a pd
t1=pd.Timestamp('2013-04-01 00:00:00')
How can I get another pandas timestamp, offset by k months from t1?
Copyright © 2021 Jogjafile Inc.
You can use
relativedelta:Or
DateOffset:Thanks to @AlexRiley for the suggested edit,
relativedeltahas been moved topd.offsets.relativedeltasince0.20.0