Skip to content

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

Merged
merged 9 commits into from
Mar 29, 2020

Conversation

mroeschke
Copy link
Member

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 use apply instead.

@pep8speaks
Copy link

pep8speaks commented Mar 27, 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-03-28 20:52:23 UTC

@mroeschke mroeschke added Error Reporting Incorrect or improved errors from pandas Window rolling, ewma, expanding labels Mar 27, 2020
@mroeschke mroeschke added this to the 1.1 milestone Mar 27, 2020
@@ -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:
Copy link
Contributor

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

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. Created a common function instead of a static method

@jreback jreback merged commit 2bf54a8 into pandas-dev:master Mar 29, 2020
@jreback
Copy link
Contributor

jreback commented Mar 29, 2020

thanks @mroeschke

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Error Reporting Incorrect or improved errors from pandas Window rolling, ewma, expanding
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants