Skip to content

BUG: groupby with CategoricalIndex doesn't include unobserved categories #49373

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 13 commits into from
Nov 7, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove TODO
  • Loading branch information
rhshadrach committed Oct 31, 2022
commit 6f779a1d9cee4888e492d7960afa786366262321
1 change: 0 additions & 1 deletion pandas/core/groupby/grouper.py
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,6 @@ def __init__(
# In extant tests, the new self.grouping_vector matches
# `index.get_level_values(ilevel)` whenever
# mapper is None and isinstance(index, MultiIndex)
# TODO: Can you have two levels with the same name?
if isinstance(index, MultiIndex):
index_level = index.get_level_values(ilevel)
else:
Expand Down