Skip to content

Commit 335cf86

Browse files
committed
BUG: Fix .to_excel() for MultiIndex containing a NaN value #13511
1 parent ba41db6 commit 335cf86

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pandas/formats/format.py

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

1843-
values = levels.take(labels, allow_fill=levels._can_hold_na,
1843+
values = levels.take(labels,
1844+
allow_fill=levels._can_hold_na,
18441845
fill_value=True)
18451846

18461847
for i in spans:

0 commit comments

Comments
 (0)