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 Oct 28, 2019
1 parent 08ab156 commit a212065
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 @@ -1308,10 +1308,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 a212065

Please sign in to comment.