Skip to content

Commit

Permalink
Follow up PR: #28097 Simplify branch statement
Browse files Browse the repository at this point in the history
  • Loading branch information
proost committed Jan 2, 2020
1 parent 0913ed0 commit bc71f05
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions pandas/core/indexes/multi.py
Original file line number Diff line number Diff line change
Expand Up @@ -1266,10 +1266,7 @@ def _get_grouper_for_level(self, mapper, level):
# Remove unobserved levels from level_index
level_index = level_index.take(uniques)

if len(level_index):
grouper = level_index.take(codes)
else:
grouper = level_index.take(codes, fill_value=True)
grouper = level_index.take(codes, fill_value=True)

return grouper, codes, level_index

Expand Down

0 comments on commit bc71f05

Please sign in to comment.