I have a problem. I perform data cleaning on excel file using python in Jupiter notebook. There are 10 sheets in my excel file. My cleaning is done successfully. But when I open excel it same as before cleaning. How can I save my data permanently in an excel file using python pandas? I import file using import os
1 Answer
First you have to save your clean data and then you can directly open that file
df.to_csv(location,index=False)
2 Comments
Talha Imtiaz
But my excel file is of .xlsx type and whenever I tried df.to_excel(location, index=False), it does not save changes that I performed through data cleaning. Any solution?
Khurram Shehzad
df.to_excel("output.xlsx",index=False)