Skip to content

REF: remove no-op casting #41317

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 1 commit into from
May 5, 2021
Merged

Conversation

jbrockmendel
Copy link
Member

In _python_agg_general:

            if self.grouper._filter_empty_groups:
                mask = counts.ravel() > 0

It isn't entirely trivial, but we can show that we will always have mask.all(), as a result of which the remainder of this code chunk of code is a no-op. This PR removes it.

As a consequence, we can remove _filter_empty_groups and compressed

@jbrockmendel jbrockmendel added Groupby Refactor Internal refactoring of code labels May 4, 2021
@jreback jreback added this to the 1.3 milestone May 5, 2021
@jreback jreback merged commit e0cc505 into pandas-dev:master May 5, 2021
@jreback
Copy link
Contributor

jreback commented May 5, 2021

nice!

@jbrockmendel jbrockmendel deleted the ref-compressed branch May 5, 2021 14:50
topper-123 added a commit to topper-123/pandas that referenced this pull request May 10, 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.

2 participants