makexu93
4/7/2019 - 5:16 PM

Replace missing values (NaN) in Pandas (Python)

Replace all missing values (NaN) with 0 in Pandas dataframe (Python).

mydata = mydata.fillna(0)

## for single column
mydata['Genre'] = mydata['Genre'].fillna(0)