df to excel without index code example
Example 1: export a dataframe to excel pandas
#Python, pandas
#To export a pandas dataframe into Excel
df.to_excel(r'Path where you want to store the exported excel file\File Name.xlsx', index = False)
Example 2: to_excel without index
import pandas as pd
writer = pd.ExcelWriter("dataframe.xlsx", engine='xlsxwriter')
dataframe.to_excel(writer,sheet_name = dataframe, index=False)
writer.save()