-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
REF: simplify ohlc #41091
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
REF: simplify ohlc #41091
Conversation
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.
LGTM, one small comment
pandas/core/groupby/groupby.py
Outdated
assert result.ndim == 1 | ||
key = base.OutputKey(label=name, position=idx) | ||
output[key] = result | ||
idx += 1 |
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.
There's an OHLC specific comment on L1098 that probably isn't relevant anymore (suggests using enumerate
, but I guess that's still not possible because of the continue
early in the loop).
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.
yah, i was counting that as part of the "simplify _wrap_aggregated_output" follow-up
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.
lgtm
merged the other one, pls rebase |
rebased + greenish (unrelated pyarrow failure thats failing on everything) |
Or more accurately, simplify BaseGroupBy._cython_agg_general by not having ohlc go through it. This will in turn allow us to simplify SeriesGroupBy._wrap_aggregated_output.
This will have a merge conflict with #41066. Doesn't matter which order they are merged in.