Skip to content

Commit 76c02f3

Browse files
authored
DOC: Update documentation for window parameter of rolling() to account for all possible data types (#49100)
Update documentation for window parameter of rolling() to account for all possible data types
1 parent 75d91c8 commit 76c02f3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pandas/core/generic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12043,7 +12043,7 @@ def min(
1204312043
@doc(Rolling)
1204412044
def rolling(
1204512045
self,
12046-
window: int | timedelta | BaseOffset | BaseIndexer,
12046+
window: int | timedelta | str | BaseOffset | BaseIndexer,
1204712047
min_periods: int | None = None,
1204812048
center: bool_t = False,
1204912049
win_type: str | None = None,

pandas/core/window/rolling.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -922,13 +922,13 @@ class Window(BaseWindow):
922922
923923
Parameters
924924
----------
925-
window : int, offset, or BaseIndexer subclass
925+
window : int, timedelta, str, offset, or BaseIndexer subclass
926926
Size of the moving window.
927927
928928
If an integer, the fixed number of observations used for
929929
each window.
930930
931-
If an offset, the time period of each window. Each
931+
If a timedelta, str, or offset, the time period of each window. Each
932932
window will be a variable sized based on the observations included in
933933
the time-period. This is only valid for datetimelike indexes.
934934
To learn more about the offsets & frequency strings, please see `this link

0 commit comments

Comments
 (0)