Multiple header in Pandas DataFrame to_excel
Had a similar issue. Solved by persisting cell-by-cell using worksheet.write(i, j, df.iloc[i,j]), with i starting after the header rows.
I need to export my DataFrame to Excel. Everything is good but I need two "rows" of headers in my output file. That mean I need two columns headers. I don't know how to export it and make double headers in DataFrame. My DataFrame is created with dictionary but I need to add extra header above.
I tried few dumb things but nothing gave me a good result. I want to have on first level header for every three columns and on second level header for each column. They must be different.
I expect output with two headers above columns.