Skip to content
Advertisement

Add empty rows at the beginning of dataframe before export to xlsx

I have a pandas dataframe and I need to append 3 blank rows over the head of the columns before to export it to xlsx.

I’m using this code based on this question:

JavaScript

But it adds the rows at index 0 and I need the blank rows before the row with the column names in the xlsx.

Is this possible to do?

Advertisement

Answer

Use startrow parameter for omit first N rows:

JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement