-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Simplify Reducer.get_result #34080
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
Simplify Reducer.get_result #34080
Conversation
pandas/_libs/reduction.pyx
Outdated
index = dummy.index | ||
dummy = dummy.values | ||
# TODO: do we still need this? | ||
self._check_dummy(dummy=dummy) |
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.
The way this is written dummy never gets used. I'm not sure what the purpose of dummy is to begin with, so maybe we can get rid of this check and its use in the constructor altogether. maybe @jbrockmendel knows
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.
IIUC this exists so that if we are using a Series subclass, that gets retained in the reduction. If that can be ensured without needing dummy, thatd be great
Closing as haven't had time to look but hope to reopen at a later date, since I think this is required for Cython 3 |
by using nditer this makes some progress towards #34014
Benchmarks for frame_apply looks as follows:
I'm not quite clear yet why the one benchmark is failing. Running it over a thousands loops in the REPL seems fine, but maybe CI will help detect something