A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/pandas-dev/pandas/issues/15440 below:

Adding Timedelta parameter to time-based .rolling() · Issue #15440 · pandas-dev/pandas · GitHub

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()

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4