From 711add5408a5239f395158045e90b864976e7b4f Mon Sep 17 00:00:00 2001 From: Linda Chen Date: Fri, 5 Jun 2020 17:47:22 -0700 Subject: [PATCH 1/8] DOC: Clarify some syntax when using win_types DOC: Clarify where to the additional arguments for some win_types For example, std needs to specify when win_types is gaussian. However, std should be specified in the operation argument, not as one of the rolling arguments. This change is to clarify this point. Closes: #34593 --- pandas/core/window/rolling.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pandas/core/window/rolling.py b/pandas/core/window/rolling.py index 92be2d056cfcb..3538c3407f01d 100644 --- a/pandas/core/window/rolling.py +++ b/pandas/core/window/rolling.py @@ -922,11 +922,11 @@ class Window(_Window): * ``blackmanharris`` * ``nuttall`` * ``barthann`` - * ``kaiser`` (needs beta) - * ``gaussian`` (needs std) - * ``general_gaussian`` (needs power, width) - * ``slepian`` (needs width) - * ``exponential`` (needs tau), center is set to None. + * ``kaiser`` (needs beta in operation argument) + * ``gaussian`` (needs std in operation argument) + * ``general_gaussian`` (needs power, width in operation argument) + * ``slepian`` (needs width in operation argument) + * ``exponential`` (needs tau in operation argument), center is set to None. If ``win_type=None`` all points are evenly weighted. To learn more about different window types see `scipy.signal window functions From a3e38ac24cd7b8ba89d231541818e1aa6c77fc68 Mon Sep 17 00:00:00 2001 From: Linda Chen Date: Sat, 6 Jun 2020 11:21:14 -0700 Subject: [PATCH 2/8] DOC: Clarify where to the additional arguments for some win_types Edit: 711add5 First Commit Original issue: #34615 --- pandas/core/window/rolling.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/pandas/core/window/rolling.py b/pandas/core/window/rolling.py index 3538c3407f01d..b9f9dd06afb6b 100644 --- a/pandas/core/window/rolling.py +++ b/pandas/core/window/rolling.py @@ -922,15 +922,18 @@ class Window(_Window): * ``blackmanharris`` * ``nuttall`` * ``barthann`` - * ``kaiser`` (needs beta in operation argument) - * ``gaussian`` (needs std in operation argument) - * ``general_gaussian`` (needs power, width in operation argument) - * ``slepian`` (needs width in operation argument) - * ``exponential`` (needs tau in operation argument), center is set to None. + * ``kaiser`` (needs parameter: beta) + * ``gaussian`` (needs parameter: std) + * ``general_gaussian`` (needs parameters: power, width) + * ``slepian`` (needs parameter: width) + * ``exponential`` (needs parameter: tau), center is set to None. If ``win_type=None`` all points are evenly weighted. To learn more about different window types see `scipy.signal window functions `__. + + Certain window types require a scale parameter to be passed. Please see the third example below + on how to add the additional parameters. Examples -------- From 45be5386b656650443404fae1842f169a65a8919 Mon Sep 17 00:00:00 2001 From: Linda Chen Date: Sat, 6 Jun 2020 11:36:25 -0700 Subject: [PATCH 3/8] DOC: Clarify where to the additional arguments for some win_types Edit: a3e38ac Second Commit What's new: I shortened line 935 so that each line is less than 88 characters. Original Issue: #34615 --- pandas/core/window/rolling.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandas/core/window/rolling.py b/pandas/core/window/rolling.py index b9f9dd06afb6b..49e8d6aa6bece 100644 --- a/pandas/core/window/rolling.py +++ b/pandas/core/window/rolling.py @@ -932,8 +932,8 @@ class Window(_Window): different window types see `scipy.signal window functions `__. - Certain window types require a scale parameter to be passed. Please see the third example below - on how to add the additional parameters. + Certain window types require a scale parameter to be passed. Please see + the third example below on how to add the additional parameters. Examples -------- From 05ed0eb01dcc0a4ec4743f30ba411c9fa6ee402f Mon Sep 17 00:00:00 2001 From: wchen928 Date: Sat, 6 Jun 2020 16:28:36 -0700 Subject: [PATCH 4/8] Revert "DOC: Clarify where to the additional arguments for some win_types" This reverts commit 45be5386b656650443404fae1842f169a65a8919. --- pandas/core/window/rolling.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandas/core/window/rolling.py b/pandas/core/window/rolling.py index 49e8d6aa6bece..b9f9dd06afb6b 100644 --- a/pandas/core/window/rolling.py +++ b/pandas/core/window/rolling.py @@ -932,8 +932,8 @@ class Window(_Window): different window types see `scipy.signal window functions `__. - Certain window types require a scale parameter to be passed. Please see - the third example below on how to add the additional parameters. + Certain window types require a scale parameter to be passed. Please see the third example below + on how to add the additional parameters. Examples -------- From bd5c74320a97afcd8b6eda0b267c5b1340dd4b16 Mon Sep 17 00:00:00 2001 From: wchen928 Date: Sat, 6 Jun 2020 16:28:48 -0700 Subject: [PATCH 5/8] Revert "Revert "DOC: Clarify where to the additional arguments for some win_types"" This reverts commit 05ed0eb01dcc0a4ec4743f30ba411c9fa6ee402f. --- pandas/core/window/rolling.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandas/core/window/rolling.py b/pandas/core/window/rolling.py index b9f9dd06afb6b..49e8d6aa6bece 100644 --- a/pandas/core/window/rolling.py +++ b/pandas/core/window/rolling.py @@ -932,8 +932,8 @@ class Window(_Window): different window types see `scipy.signal window functions `__. - Certain window types require a scale parameter to be passed. Please see the third example below - on how to add the additional parameters. + Certain window types require a scale parameter to be passed. Please see + the third example below on how to add the additional parameters. Examples -------- From 0b36ff1b2ab51ae41435e6dc0e55eb1de0b4927d Mon Sep 17 00:00:00 2001 From: wchen928 Date: Sat, 6 Jun 2020 16:59:50 -0700 Subject: [PATCH 6/8] DOC: Remove whitespace in docstring --- pandas/core/window/rolling.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/core/window/rolling.py b/pandas/core/window/rolling.py index 49e8d6aa6bece..dfd34ccb73cf5 100644 --- a/pandas/core/window/rolling.py +++ b/pandas/core/window/rolling.py @@ -932,7 +932,7 @@ class Window(_Window): different window types see `scipy.signal window functions `__. - Certain window types require a scale parameter to be passed. Please see + Certain window types require a scale parameter to be passed. Please see the third example below on how to add the additional parameters. Examples From de76df88259f21d56e3e5cca3086d8830efc1c92 Mon Sep 17 00:00:00 2001 From: wchen928 Date: Sat, 6 Jun 2020 17:56:52 -0700 Subject: [PATCH 7/8] DOC: Remove indent of line934 --- pandas/core/window/rolling.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/core/window/rolling.py b/pandas/core/window/rolling.py index dfd34ccb73cf5..8cdca1f8a9ed5 100644 --- a/pandas/core/window/rolling.py +++ b/pandas/core/window/rolling.py @@ -931,7 +931,7 @@ class Window(_Window): If ``win_type=None`` all points are evenly weighted. To learn more about different window types see `scipy.signal window functions `__. - + Certain window types require a scale parameter to be passed. Please see the third example below on how to add the additional parameters. From edfb124129d06c6685f6967e12718764c8739960 Mon Sep 17 00:00:00 2001 From: Linda Chen Date: Tue, 9 Jun 2020 10:43:34 -0700 Subject: [PATCH 8/8] Update pandas/core/window/rolling.py --- pandas/core/window/rolling.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/core/window/rolling.py b/pandas/core/window/rolling.py index 8cdca1f8a9ed5..20cd907bc5430 100644 --- a/pandas/core/window/rolling.py +++ b/pandas/core/window/rolling.py @@ -932,7 +932,7 @@ class Window(_Window): different window types see `scipy.signal window functions `__. - Certain window types require a scale parameter to be passed. Please see + Certain window types require additional parameters to be passed. Please see the third example below on how to add the additional parameters. Examples