Skip to content

Commit a89e745

Browse files
address comments
1 parent f35fce4 commit a89e745

File tree

2 files changed

+16
-14
lines changed

2 files changed

+16
-14
lines changed

pandas/core/groupby/groupby.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3664,7 +3664,7 @@ def rolling(
36643664
Interval of the moving window.
36653665
36663666
If an integer, the delta between the start and end of each window.
3667-
Example: window = 3 interval from 1 -> 4
3667+
The number of points in the window depends on the ``closed`` argument.
36683668
36693669
If a timedelta, str, or offset, the time period of each window. Each
36703670
window will be a variable sized based on the observations included in
@@ -3711,17 +3711,18 @@ def rolling(
37113711
37123712
closed : str, default None
37133713
Determines the inclusivity of points in the window
3714-
If ``'right'``, (First, Last] the last point in the window
3714+
3715+
If ``'right'``, uses the window (first, last] meaning the last point
37153716
is included in the calculations.
37163717
3717-
If ``'left'``, [First, Last) the first point in the window
3718+
If ``'left'``, uses the window [first, last) meaning the first point
37183719
is included in the calculations.
37193720
3720-
If ``'both'``, [First, Last] all points in the window
3721-
are included in the calculations.
3721+
If ``'both'``, uses the window [first, last] meaning all points in
3722+
the window are included in the calculations.
37223723
3723-
If ``'neither'``, (First, Last) the first and last points
3724-
in the window are excludedfrom calculations.
3724+
If ``'neither'``, uses the window (first, last) meaning the first
3725+
and last points in the window are excluded from calculations.
37253726
37263727
() and [] are referencing open and closed set
37273728
notation respetively.

pandas/core/window/rolling.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -884,7 +884,7 @@ class Window(BaseWindow):
884884
Interval of the moving window.
885885
886886
If an integer, the delta between the start and end of each window.
887-
Example: window = 3 interval from 1 -> 4
887+
The number of points in the window depends on the ``closed`` argument.
888888
889889
If a timedelta, str, or offset, the time period of each window. Each
890890
window will be a variable sized based on the observations included in
@@ -930,17 +930,18 @@ class Window(BaseWindow):
930930
931931
closed : str, default None
932932
Determines the inclusivity of points in the window
933-
If ``'right'``, (First, Last] the last point in the window
933+
934+
If ``'right'``, uses the window (first, last] meaning the last point
934935
is included in the calculations.
935936
936-
If ``'left'``, [First, Last) the first point in the window
937+
If ``'left'``, uses the window [first, last) meaning the first point
937938
is included in the calculations.
938939
939-
If ``'both'``, [First, Last] all points in the window
940-
are included in the calculations.
940+
If ``'both'``, uses the window [first, last] meaning all points in
941+
the window are included in the calculations.
941942
942-
If ``'neither'``, (First, Last) the first and last points
943-
in the window are excludedfrom calculations.
943+
If ``'neither'``, uses the window (first, last) meaning the first
944+
and last points in the window are excluded from calculations.
944945
945946
() and [] are referencing open and closed set
946947
notation respetively.

0 commit comments

Comments
 (0)