Skip to content

REF: dont pass keys through wrap_applied_output #43479

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
Sep 9, 2021

Conversation

jbrockmendel
Copy link
Member

This makes it easier to reason about these keys, which I'm hopeful will lead to getting rid of them entirely and just using result_index.

@@ -726,10 +726,15 @@ def _get_group_keys(self):
return get_flattened_list(ids, ngroups, self.levels, self.codes)

@final
def apply(self, f: F, data: FrameOrSeries, axis: int = 0):
@cache_readonly
def group_keys_seq(self):
Copy link
Contributor

Choose a reason for hiding this comment

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

why are you adding this?

Copy link
Member Author

Choose a reason for hiding this comment

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

without adding this, the PR makes us call _get_group_keys repeatedly; this is a cached version of that call

Copy link
Member Author

Choose a reason for hiding this comment

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

updated to just remove _get_group_keys and only have the cached version

@jreback jreback added Groupby Refactor Internal refactoring of code labels Sep 9, 2021
@jreback jreback added this to the 1.4 milestone Sep 9, 2021
@jreback jreback merged commit 805f0d9 into pandas-dev:master Sep 9, 2021
@jreback
Copy link
Contributor

jreback commented Sep 9, 2021

sure

@jbrockmendel jbrockmendel deleted the ref-gbwrap-3 branch November 20, 2021 23:20
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.

2 participants