Skip to content

DOC: Update documentation for window parameter of rolling() to account for all possible data types #49100

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pandas/core/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -12042,7 +12042,7 @@ def min(
@doc(Rolling)
def rolling(
self,
window: int | timedelta | BaseOffset | BaseIndexer,
window: int | timedelta | str | BaseOffset | BaseIndexer,
min_periods: int | None = None,
center: bool_t = False,
win_type: str | None = None,
Expand Down
4 changes: 2 additions & 2 deletions pandas/core/window/rolling.py
Original file line number Diff line number Diff line change
Expand Up @@ -922,13 +922,13 @@ class Window(BaseWindow):

Parameters
----------
window : int, offset, or BaseIndexer subclass
window : int, timedelta, str, offset, or BaseIndexer subclass
Size of the moving window.

If an integer, the fixed number of observations used for
each window.

If an offset, the time period of each window. Each
If a timedelta, str, or offset, the time period of each window. Each
window will be a variable sized based on the observations included in
the time-period. This is only valid for datetimelike indexes.
To learn more about the offsets & frequency strings, please see `this link
Expand Down