export pandas dataframe as excel

df.to_excel(r'C:\Users\Ron\Desktop\File_Name.xlsx', index = False)

#if you omit the file path (must also omit 'r') and 
#enter only file_name.xlsx, it will save to your default file location,
# that is, where the file you're reading from is located.

Here is what the above code is Doing:
1. We’re reading in the file, and assigning it to a variable called df.
2. We’re using the .to_excel() method to write the dataframe to an excel file.
3. We’re specifying the file path where we want to save the file.
4. We’re specifying that we don’t want the index column to be saved.