Skip to content
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
17 changes: 12 additions & 5 deletions pandas/core/groupby/groupby.py
Original file line number Diff line number Diff line change
Expand Up @@ -3710,14 +3710,21 @@ def rolling(
an integer index is not used to calculate the rolling window.

closed : str, default None
If ``'right'``, the first point in the window is excluded from calculations.
Determines the inclusivity of points in the window
If ``'right'``, (First, Last] the last point in the window
is included in the calculations.

If ``'left'``, the last point in the window is excluded from calculations.
If ``'left'``, [First, Last) the first point in the window
is included in the calculations.

If ``'both'``, no points in the window are excluded from calculations.
If ``'both'``, [First, Last] all points in the window
are included in the calculations.

If ``'neither'``, the first and last points in the window are excluded
from calculations.
If ``'neither'``, (First, Last) the first and last points
in the window are excludedfrom calculations.

() and [] are referencing open and closed set
notation respetively.

Default ``None`` (``'right'``).

Expand Down
17 changes: 12 additions & 5 deletions pandas/core/window/rolling.py
Original file line number Diff line number Diff line change
Expand Up @@ -929,14 +929,21 @@ class Window(BaseWindow):
an integer index is not used to calculate the rolling window.

closed : str, default None
If ``'right'``, the first point in the window is excluded from calculations.
Determines the inclusivity of points in the window
If ``'right'``, (First, Last] the last point in the window
is included in the calculations.

If ``'left'``, the last point in the window is excluded from calculations.
If ``'left'``, [First, Last) the first point in the window
is included in the calculations.

If ``'both'``, no point in the window is excluded from calculations.
If ``'both'``, [First, Last] all points in the window
are included in the calculations.

If ``'neither'``, the first and last points in the window are excluded
from calculations.
If ``'neither'``, (First, Last) the first and last points
in the window are excludedfrom calculations.

() and [] are referencing open and closed set
notation respetively.

Default ``None`` (``'right'``).

Expand Down