Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
ENH: Add engine keyword to expanding.apply to utilize Numba #30937
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
ENH: Add engine keyword to expanding.apply to utilize Numba #30937
Changes from all commits
ad5e12e
4e7b566
36bbead
970778b
6442f15
42b6064
02e6724
cb7bf1c
7ab9229
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Is this totally equivalent? I get the impression previously should have been *args and **kwargs so a little strange as is, but I don't think converting to
None
is totally the same?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.
Previously the docs described
rolling/expanding.apply
being able to take *args, **kwargs: https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.core.window.Expanding.apply.htmlBut in actuality, the arguments were
args=(), kwargs={}
: https://github.com/pandas-dev/pandas/blob/0.25.x/pandas/core/window.py#L2128Since the docs were incorrect, and the prior arguments has a mutable default argument, I changed
rolling.apply
to beargs=None, kwargs=None
(later converting toargs=(), kwargs={}
internally if stillNone
), and I am doing the same here forexpanding.apply
.So slightly changing the behavior, but taking advantage of the fact the docs were incorrect in the first place.