-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
ERR: Raise NotImplementedError with BaseIndexer and certain rolling operations #33057
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
ERR: Raise NotImplementedError with BaseIndexer and certain rolling operations #33057
Conversation
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-03-28 20:52:23 UTC |
pandas/core/window/rolling.py
Outdated
@@ -145,6 +145,20 @@ def _validate_get_window_bounds_signature(window: BaseIndexer) -> None: | |||
f"get_window_bounds" | |||
) | |||
|
|||
@staticmethod | |||
def _validate_baseindexer_support(window, func_name: Optional[str]) -> None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
either make this a method or just a module level free function ; i find static methods are
non obvious to grok
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Created a common function instead of a static method
thanks @mroeschke |
…olling operations (pandas-dev#33057)" This reverts commit 2bf54a8.
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff
As a temporary solution for returning incorrect results when using a BaseIndexer subclass with certain rolling operations, a
NotImplementedError
will now raise with instructions to useapply
instead.