Skip to content

Commit

Permalink
Follow up PR: #28097 Simplify branch statement (#29243)
Browse files Browse the repository at this point in the history
  • Loading branch information
proost authored and jreback committed Jan 26, 2020
1 parent d12c2c6 commit 8e1dd1e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pandas/core/indexes/multi.py
Original file line number Diff line number Diff line change
Expand Up @@ -1261,10 +1261,10 @@ def _get_grouper_for_level(self, mapper, level):
# on the output of a groupby doesn't reflect back here.
level_index = level_index.copy()

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

return grouper, codes, level_index

Expand Down

0 comments on commit 8e1dd1e

Please sign in to comment.