0
$\begingroup$

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
$\endgroup$

1 Answer 1

2
$\begingroup$

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!

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.