-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Closed
Labels
BugFrequencyDateOffsetsDateOffsetsReshapingConcat, Merge/Join, Stack/Unstack, ExplodeConcat, Merge/Join, Stack/Unstack, Explode
Milestone
Description
Starting with a simple DataFrame:
n = 10
df = pd.DataFrame({'value': np.arange(n)},
index=pd.date_range('2015-12-24', periods=n, freq="D"))
I can invoke a time-based .rolling()
with a string for the offset:
df.rolling('3d').sum()
I would like to invoke it with a Timedelta
since it is easier to arithmetically change the window length:
df.rolling(pd.Timedelta(days=3)).sum()
Metadata
Metadata
Assignees
Labels
BugFrequencyDateOffsetsDateOffsetsReshapingConcat, Merge/Join, Stack/Unstack, ExplodeConcat, Merge/Join, Stack/Unstack, Explode