python full na with vlue code example
Example 1: pandas to convert null values to mean in numeric column
df.fillna(df.mean(), inplace=True)
Example 2: replace nan using fillna
>>> df.fillna(method='ffill')
A B C D
0 NaN 2.0 NaN 0
1 3.0 4.0 NaN 1
2 3.0 4.0 NaN 5
3 3.0 3.0 NaN 4