Skip to content

Commit ba41db6

Browse files
committed
CLN: Get rid of conditional.
1 parent 9abc4e8 commit ba41db6

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

pandas/formats/format.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1840,10 +1840,8 @@ def _format_hierarchical_rows(self):
18401840
self.df.index.levels,
18411841
self.df.index.labels):
18421842

1843-
if levels._can_hold_na:
1844-
values = levels.take(labels, fill_value=True)
1845-
else:
1846-
values = levels.take(labels)
1843+
values = levels.take(labels, allow_fill=levels._can_hold_na,
1844+
fill_value=True)
18471845

18481846
for i in spans:
18491847
if spans[i] > 1:

0 commit comments

Comments
 (0)