Skip to content

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

Merged
merged 2 commits into from
Apr 23, 2021
Merged

REF: simplify ohlc #41091

merged 2 commits into from
Apr 23, 2021

Conversation

jbrockmendel
Copy link
Member

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.

Copy link
Member

@mzeitlin11 mzeitlin11 left a 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

assert result.ndim == 1
key = base.OutputKey(label=name, position=idx)
output[key] = result
idx += 1
Copy link
Member

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).

Copy link
Member Author

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

Copy link
Member

@rhshadrach rhshadrach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@jbrockmendel jbrockmendel added Groupby Refactor Internal refactoring of code labels Apr 22, 2021
@jreback
Copy link
Contributor

jreback commented Apr 22, 2021

merged the other one, pls rebase

@jbrockmendel
Copy link
Member Author

rebased + greenish (unrelated pyarrow failure thats failing on everything)

@jreback jreback added this to the 1.3 milestone Apr 23, 2021
@jreback jreback merged commit b140135 into pandas-dev:master Apr 23, 2021
@jbrockmendel jbrockmendel deleted the ref-ohlc branch April 23, 2021 01:54
yeshsurya pushed a commit to yeshsurya/pandas that referenced this pull request May 6, 2021
JulianWgs pushed a commit to JulianWgs/pandas that referenced this pull request Jul 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Groupby Refactor Internal refactoring of code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants