Skip to content

Instantly share code, notes, and snippets.

@jmquintana79
Created July 17, 2024 10:54
Show Gist options
  • Save jmquintana79/0a69c526237b22bf6126324275279688 to your computer and use it in GitHub Desktop.
Save jmquintana79/0a69c526237b22bf6126324275279688 to your computer and use it in GitHub Desktop.
Guardado de varios dataframes en un sólo fichero excel.
# multiple pandas df tables to one excel file on multiple sheets
with pd.ExcelWriter(path_output, engine='xlsxwriter') as writer:
df1.to_excel(writer, sheet_name='sheet1')
df2.to_excel(writer, sheet_name='sheet2')
df3.to_excel(writer, sheet_name='sheet3')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment