Skip to content

BUG: groupby with sort=False creates buggy MultiIndex #32291

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

Closed
wants to merge 7 commits into from

Conversation

MarcoGorelli
Copy link
Member

@MarcoGorelli MarcoGorelli commented Feb 27, 2020

EDIT

probably better/less invasive to make sure .groupby(, sort=False) returns an object where the index has codes which reflect the ordering

@@ -2015,6 +2015,29 @@ def test_dup_labels_output_shape(groupby_func, idx):
tm.assert_index_equal(result.columns, idx)


def test_multiindex_lexsorted():
Copy link
Member Author

Choose a reason for hiding this comment

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

note to self - add GH note here :)

@jreback
Copy link
Contributor

jreback commented Feb 27, 2020

can you set the names of PRs to be the similar to the issue

@MarcoGorelli MarcoGorelli changed the title Issue 32259 BUG: groupby with sort=False creates buggy MultiIndex Feb 27, 2020
@MarcoGorelli MarcoGorelli force-pushed the issue-32259 branch 2 times, most recently from 08643fc to 64e3d4a Compare February 27, 2020 15:14
@MarcoGorelli
Copy link
Member Author

harder than I thought, closing for now, will return to it at later stage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: groupby with sort=False creates buggy MultiIndex
2 participants