how to export the data edited to a new excel file The provided code imports the excel file and removes the not NaN values and store it in df2. Now, How do i save the changes to an another file.

df1 = pd.read_excel('file_name.xlsx')
df2 = df1[pd.isnull(df1['column_name'])]
df2
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!