Home > front end >  Dropping Pandas Data Frame to Existing Excel sheet
Dropping Pandas Data Frame to Existing Excel sheet

Time:10-19

Is there any way to drop data frame in to existing Excel sheet. I have a Data Frame that I need to copy in to specific Excel sheet to specific location in the sheet, to cell A2, so it will mirror(paste) the whole data frame. Starting from selected cell(like the the picture) and including cells below. In this way I do not have to assign values to specific cell one by one.

df = pd.DataFrame([[1,2,3],[1,2,3]], columns=list('ABC')

enter image description here

enter image description here

CodePudding user response:

You can to read the excel file withpd.read_excel(), copy the firs row to your DataFrame and save the DataFrame as excel file with a same name.

CodePudding user response:

Use startrow

  • Related