Skip to content

DOC: Clarify where to the additional arguments for some win_types #34615

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jun 18, 2020
10 changes: 5 additions & 5 deletions pandas/core/window/rolling.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if it may be helpful to also add some additional explanation below (something like: "Certain window types require that a scale parameter be passed...") since this is a fairly confusing situation, and then call attention to the Gaussian case in the examples section. Thoughts @wchen928 @MarcoGorelli?

Copy link
Contributor Author

@linnndachen linnndachen Jun 6, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about we change to the following and add one more sentence before we list all the examples.

Suggested change
* ``exponential`` (needs tau in operation argument), center is set to None.
* ``exponential`` (need parameter: tau), center is set to None.

Additional sentence: Certain window types require a scale parameter to be passed. Please see the third example below on how to add the additional parameters.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see the third example below on how to add the additional parameters.

Sure, sounds good to me

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great. I will wait for @dsaxton 's opinion and before editing it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works for me too 👍


If ``win_type=None`` all points are evenly weighted. To learn more about
different window types see `scipy.signal window functions
Expand Down