We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 45113f8 commit c5a1211Copy full SHA for c5a1211
pandas/io/formats/excel.py
@@ -649,12 +649,15 @@ def _format_header_regular(self) -> Iterable[ExcelCell]:
649
)
650
651
def _format_header(self) -> Iterable[ExcelCell]:
652
+ gen: Iterable[ExcelCell]
653
+
654
if isinstance(self.columns, MultiIndex):
655
gen = self._format_header_mi()
656
else:
657
gen = self._format_header_regular()
658
- gen2 = ()
659
+ gen2: Iterable[ExcelCell] | tuple[()] = ()
660
661
if self.df.index.names:
662
row = [x if x is not None else "" for x in self.df.index.names] + [
663
""
0 commit comments