Skip to content

Conversation

@rhshadrach
Copy link
Member

@rhshadrach rhshadrach added Bug Groupby Categorical Categorical Data Type labels Nov 10, 2022
Copy link
Member

@mroeschke mroeschke left a comment

Choose a reason for hiding this comment

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

Nice, I think this behavior is a lot more sane.

Could you update the groupby docstring to mention that sort dictates the order even when ordered=True?

@rhshadrach rhshadrach requested a review from mroeschke November 10, 2022 20:12
@mroeschke mroeschke added this to the 2.0 milestone Nov 10, 2022
@mroeschke mroeschke merged commit 9c05918 into pandas-dev:main Nov 10, 2022
@mroeschke
Copy link
Member

Thanks @rhshadrach

@rhshadrach rhshadrach deleted the cat_ordered_nosort branch November 10, 2022 20:39
codamuse pushed a commit to codamuse/pandas that referenced this pull request Nov 12, 2022
…as-dev#49613)

* BUG: groupby with sort=False still sorts an ordered categorical

* Add versionchanged
mliu08 pushed a commit to mliu08/pandas that referenced this pull request Nov 27, 2022
…as-dev#49613)

* BUG: groupby with sort=False still sorts an ordered categorical

* Add versionchanged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Categorical Categorical Data Type Groupby

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: groupby with sort=False not respected for categorical data for MultiIndex with 2 grouping keys

2 participants