Skip to content

Commit

Permalink
DOC: Clarify where to the additional arguments for some win_types (#3…
Browse files Browse the repository at this point in the history
…4615)

* 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

* DOC: Clarify where to the additional arguments for some win_types

Edit: 711add5 First Commit
Original issue: #34615

* 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

* Revert "DOC: Clarify where to the additional arguments for some win_types"

This reverts commit 45be538.

* Revert "Revert "DOC: Clarify where to the additional arguments for some win_types""

This reverts commit 05ed0eb.

* DOC: Remove whitespace in docstring

* DOC: Remove indent of line934

* Update pandas/core/window/rolling.py

Co-authored-by: Tom Augspurger <tom.w.augspurger@gmail.com>
  • Loading branch information
linnndachen and TomAugspurger committed Jun 18, 2020
1 parent 72aed3e commit 5d69786
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions pandas/core/window/rolling.py
Original file line number Diff line number Diff line change
Expand Up @@ -922,16 +922,19 @@ 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 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
<https://docs.scipy.org/doc/scipy/reference/signal.html#window-functions>`__.
Certain window types require additional parameters to be passed. Please see
the third example below on how to add the additional parameters.
Examples
--------
>>> df = pd.DataFrame({'B': [0, 1, 2, np.nan, 4]})
Expand Down

0 comments on commit 5d69786

Please sign in to comment.