Skip to content

Conversation

mroeschke
Copy link
Member

@mroeschke mroeschke commented Oct 17, 2020

Additionally cleans up some helper methods

@mroeschke mroeschke added Clean Window rolling, ewma, expanding labels Oct 17, 2020
@mroeschke mroeschke added this to the 1.2 milestone Oct 17, 2020
@pep8speaks
Copy link

pep8speaks commented Oct 19, 2020

Hello @mroeschke! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2020-10-30 19:32:34 UTC

@mroeschke mroeschke changed the title CLN: weighted rolling window helper functions ENH: Support all Scipy window types in rolling(..., win_type) Oct 19, 2020
@mroeschke mroeschke mentioned this pull request Oct 19, 2020
32 tasks

.. versionadded:: 1.2.0

All Scipy window types, concurrent with your installed version, are recognized ``win_types``.
Copy link
Contributor

Choose a reason for hiding this comment

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

which functions do we now support that we did not before? can u enumerate them

Copy link
Member Author

Choose a reason for hiding this comment

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

Added. Eventually, we should remove all the enumerated supported window types as it will get stale with scipy developments

Copy link
Contributor

Choose a reason for hiding this comment

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

maybe
but we do parameter introspection now -
would be ok to fix this up i think and just point to the documentation of the actual window functions

@jreback jreback removed this from the 1.2 milestone Oct 20, 2020
@mroeschke mroeschke added this to the 1.2 milestone Oct 21, 2020
"scipy.signal", extra="Scipy is required to generate window weight."
)
assert self.win_type is not None # for mypy
window = getattr(signal, self.win_type)(self.window, **kwargs)
Copy link
Contributor

Choose a reason for hiding this comment

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

add a test if you pass bogus kwargs to a real scipy function.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

@mroeschke
Copy link
Member Author

All green besides the (expected) failing 32-bit build

@jreback jreback merged commit 499b5ef into pandas-dev:master Oct 31, 2020
@jreback
Copy link
Contributor

jreback commented Oct 31, 2020

thanks @mroeschke

@mroeschke mroeschke deleted the cln/weighted_rolling_window_methods branch October 31, 2020 22:57
kesmit13 pushed a commit to kesmit13/pandas that referenced this pull request Nov 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement Window rolling, ewma, expanding

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ENH: Rolling Calculations Ignore Extended Window Specification

3 participants