Skip to content

TST: GroupBy on 2 rows of MultiIndex returns correct group indices #35494

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
Aug 3, 2020

Conversation

smithto1
Copy link
Member

There was previously a bug where grouping on precisely two rows of a MultiIndex would return a wrongly formatted index. This PR is adding a test to enforce this correct behaviour. The new test fails on 0.20.3 but passes on >=1.0.5.

@simonjayhawkins simonjayhawkins added Groupby MultiIndex Testing pandas testing functions or related to the test suite labels Jul 31, 2020
@simonjayhawkins simonjayhawkins added this to the 1.2 milestone Jul 31, 2020
@jreback jreback merged commit 87c1761 into pandas-dev:master Aug 3, 2020
@jreback
Copy link
Contributor

jreback commented Aug 3, 2020

thanks @smithto1 very nice, keep em coming!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Groupby MultiIndex Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: Pandas groupby indices behaving diferrently with 2 and 3 rows
3 participants