export pandas dataframe to excel 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: convert excel workbook to dataframe
workbook = pd.ExcelFile('***.xls')
sheets = workbook.sheet_names
df = pd.concat([pd.read_excel(workbook, sheet_name=s)
.assign(sheet_name=s) for s in sheets])