0

I have a list of dataframes (list_df). Each dataframe should go in one excel sheet. I have pandas and pyodbc installed. I tried this:

for i,df in enumerate (list_df):
    df.to_excel(myPathto excel, sheet_name = INSTITUTE[i])

INSTITUTE is another list with all the sheet names I want. The query works, but it gives me only one result: I get only one sheet in one excel with only the last dataframe in it.

How can I fix this?

Eyal Golan
  • 1,761
  • 1
  • 13
  • 21
Sorin
  • 1

0 Answers0