Skip to content

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

Closed
wants to merge 9 commits into from

Conversation

mroeschke
Copy link
Member

@pep8speaks
Copy link

pep8speaks commented Mar 4, 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-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):
Copy link
Contributor

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):
Copy link
Contributor

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?

Copy link
Member Author

@mroeschke mroeschke Mar 4, 2020

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(
Copy link
Contributor

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

Copy link
Member Author

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.

@mroeschke
Copy link
Member Author

Closing as I am going to try to address this in another fashion

@mroeschke mroeschke closed this Mar 14, 2020
@mroeschke mroeschke deleted the groupby_engine branch April 21, 2020 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ENH: Add engine keyword argument to groupby.apply to leverage Numba
3 participants