You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I agree this would be useful functionality. Were you thinking that we would design xr.DateOffset such that it would work for both np.datetime64 values and cftime objects?
Consider the following cftime vector. It's fairly common to see users asking how to subtract "1 month" from this kind of vector:
Subtracting
pd.Timedelta("1 month")
does not work because a month does not represent an absolute unit of time. Instead the solution appears to be:I think pandas exposes this functionality as
pd.DateOffset(months=1)
. Can we add a similarxr.DateOffset
?The text was updated successfully, but these errors were encountered: