From a89e7458cdf83068c9f9941bbf42e83f3063e22f Mon Sep 17 00:00:00 2001 From: Sebastian Date: Mon, 3 Feb 2025 21:28:17 -0500 Subject: [PATCH] address comments --- pandas/core/groupby/groupby.py | 15 ++++++++------- pandas/core/window/rolling.py | 15 ++++++++------- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/pandas/core/groupby/groupby.py b/pandas/core/groupby/groupby.py index 9f8ecd6a0d565..92b93aa280f6a 100644 --- a/pandas/core/groupby/groupby.py +++ b/pandas/core/groupby/groupby.py @@ -3664,7 +3664,7 @@ def rolling( Interval of the moving window. If an integer, the delta between the start and end of each window. - Example: window = 3 interval from 1 -> 4 + The number of points in the window depends on the ``closed`` argument. 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 @@ -3711,17 +3711,18 @@ def rolling( closed : str, default None Determines the inclusivity of points in the window - If ``'right'``, (First, Last] the last point in the window + + If ``'right'``, uses the window (first, last] meaning the last point is included in the calculations. - If ``'left'``, [First, Last) the first point in the window + If ``'left'``, uses the window [first, last) meaning the first point is included in the calculations. - If ``'both'``, [First, Last] all points in the window - are included in the calculations. + If ``'both'``, uses the window [first, last] meaning all points in + the window are included in the calculations. - If ``'neither'``, (First, Last) the first and last points - in the window are excludedfrom calculations. + If ``'neither'``, uses the window (first, last) meaning the first + and last points in the window are excluded from calculations. () and [] are referencing open and closed set notation respetively. diff --git a/pandas/core/window/rolling.py b/pandas/core/window/rolling.py index 862e5e04b746c..c9bd26ab0ce76 100644 --- a/pandas/core/window/rolling.py +++ b/pandas/core/window/rolling.py @@ -884,7 +884,7 @@ class Window(BaseWindow): Interval of the moving window. If an integer, the delta between the start and end of each window. - Example: window = 3 interval from 1 -> 4 + The number of points in the window depends on the ``closed`` argument. 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 @@ -930,17 +930,18 @@ class Window(BaseWindow): closed : str, default None Determines the inclusivity of points in the window - If ``'right'``, (First, Last] the last point in the window + + If ``'right'``, uses the window (first, last] meaning the last point is included in the calculations. - If ``'left'``, [First, Last) the first point in the window + If ``'left'``, uses the window [first, last) meaning the first point is included in the calculations. - If ``'both'``, [First, Last] all points in the window - are included in the calculations. + If ``'both'``, uses the window [first, last] meaning all points in + the window are included in the calculations. - If ``'neither'``, (First, Last) the first and last points - in the window are excludedfrom calculations. + If ``'neither'``, uses the window (first, last) meaning the first + and last points in the window are excluded from calculations. () and [] are referencing open and closed set notation respetively.