how to export the data edited to a new excel file
You could simply use:

df2.to_excel("output.xlsx")


I suggest you take some time to look at the various functionalities pandas offers. Will be great help to you in future!