I was creating a program to replace all the none values in a data file ( excel sheet) using pandas. for that I first read the excel file and then used the replace method.
My code:
import pandas as pd
import numpy as np
A='Book2.xlsx'
dataa=pd.read_excel(A)
dataa[:].replace(np.nan,1,inplace=True)
print(dataa.iloc[3,1])
print(dataa)
But the changes reflected only in the read variable (dataa), not in the original file.
The original excel data file (after code execution), where no changes took place.
Please tell if I've done something going wrong, and what to do to resolve this.