-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
WIP: ENH: Add engine keyword argument to groupby.apply to leverage Numba #32428
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
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-04 08:40:09 UTC |
@@ -223,8 +223,10 @@ def _selection_name(self): | |||
input="series", examples=_apply_docs["series_examples"] | |||
) | |||
) | |||
def apply(self, func, *args, **kwargs): | |||
return super().apply(func, *args, **kwargs) | |||
def apply(self, func, engine="cython", engine_kwargs=None, *args, **kwargs): |
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.
will want to update the doc-strings as well
from pandas.compat._optional import import_optional_dependency | ||
|
||
|
||
class InvalidApply(Exception): |
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.
why do you need a new exception?
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.
Sure will want to import this from its original location in cython. Or we can move InvalidApply
to pandas.errors
) | ||
|
||
|
||
def make_groupby_apply( |
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.
can we share pandas/core/window/numba_.py at all? maybe put common functions in pandas/core/algos/numba_.py (we have another issue about creating this and moving pandas/core/aggregation.py and algorithms.py to there
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.
Definitely, will consolidate in another commit.
Closing as I am going to try to address this in another fashion |
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff