From 5b92b7e2183a5548fc2f8e21124f4d0e2cd66370 Mon Sep 17 00:00:00 2001 From: ihsan Date: Sat, 6 Jul 2019 20:52:36 +0300 Subject: [PATCH 1/3] DOC: Clarify column type for 'on' parameter of rolling --- pandas/core/window.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandas/core/window.py b/pandas/core/window.py index 27588249b1b3c..2eb795aa4d9f2 100644 --- a/pandas/core/window.py +++ b/pandas/core/window.py @@ -513,8 +513,8 @@ class Window(_Window): Provide a window type. If ``None``, all points are evenly weighted. See the notes below for further information. on : str, optional - For a DataFrame, column on which to calculate - the rolling window, rather than the index. + For a DataFrame, a datetime-like column on which to calculate + the rolling window, rather than the DataFrame's index. axis : int or str, default 0 closed : str, default None Make the interval closed on the 'right', 'left', 'both' or From becd37c2e9b23026dee4c1e414bc286bc4600d41 Mon Sep 17 00:00:00 2001 From: ihsan Date: Mon, 8 Jul 2019 10:04:19 +0300 Subject: [PATCH 2/3] Explain what happens when an integer column is provided --- pandas/core/window.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pandas/core/window.py b/pandas/core/window.py index 2eb795aa4d9f2..c29fdc3e816ed 100644 --- a/pandas/core/window.py +++ b/pandas/core/window.py @@ -513,8 +513,10 @@ class Window(_Window): Provide a window type. If ``None``, all points are evenly weighted. See the notes below for further information. on : str, optional - For a DataFrame, a datetime-like column on which to calculate - the rolling window, rather than the DataFrame's index. + For a DataFrame, a datetime-like column on which to calculate the rolling + window, rather than the DataFrame's index. Provided integer column will + be excluded from result since integer indexes are not used to calculate + the rolling window. axis : int or str, default 0 closed : str, default None Make the interval closed on the 'right', 'left', 'both' or From 45c3d15f0d4471a3fac24e71f6d1d8989f2a328c Mon Sep 17 00:00:00 2001 From: ihsan Date: Mon, 8 Jul 2019 10:06:42 +0300 Subject: [PATCH 3/3] Minor change --- pandas/core/window.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pandas/core/window.py b/pandas/core/window.py index c29fdc3e816ed..0c1f6a1a6dace 100644 --- a/pandas/core/window.py +++ b/pandas/core/window.py @@ -514,9 +514,9 @@ class Window(_Window): See the notes below for further information. on : str, optional For a DataFrame, a datetime-like column on which to calculate the rolling - window, rather than the DataFrame's index. Provided integer column will - be excluded from result since integer indexes are not used to calculate - the rolling window. + window, rather than the DataFrame's index. Provided integer column is + ignored and excluded from result since an integer index is not used to + calculate the rolling window. axis : int or str, default 0 closed : str, default None Make the interval closed on the 'right', 'left', 'both' or