How to fill missing values in a dataset with a desired input using pandas?
To fill a null values with something else, let us create a dataframe having some null values
import numpy as np
df = pd.DataFrame({'col1':[1,2,3,np.nan],
'col2':[np.nan,555,666,444],
'col3':['abc','def','ghi','xyz']})
df.head()
Now we will the null values with a string ‘FILL’
df.fillna('FILL')