File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -826,6 +826,9 @@ def _format_hierarchical_rows(self) -> Iterable[ExcelCell]:
826
826
fill_value = levels ._na_value ,
827
827
)
828
828
829
+ if isinstance (values , PeriodIndex ):
830
+ values = values .to_timestamp ()
831
+
829
832
for i , span_val in spans .items ():
830
833
mergestart , mergeend = None , None
831
834
if span_val > 1 :
@@ -849,6 +852,10 @@ def _format_hierarchical_rows(self) -> Iterable[ExcelCell]:
849
852
# Format hierarchical rows with non-merged values.
850
853
for indexcolvals in zip (* self .df .index ):
851
854
for idx , indexcolval in enumerate (indexcolvals ):
855
+
856
+ if isinstance (indexcolval , Period ):
857
+ indexcolval = indexcolval .to_timestamp ()
858
+
852
859
yield CssExcelCell (
853
860
row = self .rowcounter + idx ,
854
861
col = gcolidx ,
You can’t perform that action at this time.
0 commit comments