pandas/to-excel

Export to Excel

Save DataFrame to an Excel file

pandas
export
excel

Command

df.to_excel

Explanation

df.to_excel() saves DataFrame to Excel format (.xlsx).

Examples

Export to Excel without index

df.to_excel("output.xlsx", index=False)