diff --git a/pandas/core/arrays/interval.py b/pandas/core/arrays/interval.py index ebabc7edcbf43..1011381f235ca 100644 --- a/pandas/core/arrays/interval.py +++ b/pandas/core/arrays/interval.py @@ -812,9 +812,7 @@ def take(self, indices, allow_fill=False, fill_value=None, axis=None, **kwargs): fill_left = fill_right = fill_value if allow_fill: - if (np.asarray(indices) == -1).any(): - # We have excel tests that pass fill_value=True, xref GH#36466 - fill_left, fill_right = self._validate_fill_value(fill_value) + fill_left, fill_right = self._validate_fill_value(fill_value) left_take = take( self.left, indices, allow_fill=allow_fill, fill_value=fill_left diff --git a/pandas/io/formats/excel.py b/pandas/io/formats/excel.py index cc7b6b0bfea97..0140804e8c7b5 100644 --- a/pandas/io/formats/excel.py +++ b/pandas/io/formats/excel.py @@ -629,7 +629,9 @@ def _format_hierarchical_rows(self): ): values = levels.take( - level_codes, allow_fill=levels._can_hold_na, fill_value=True + level_codes, + allow_fill=levels._can_hold_na, + fill_value=levels._na_value, ) for i in spans: