fill nan with value pandas code example
Example 1: replace nan in pandas
df['DataFrame Column'] = df['DataFrame Column'].fillna(0)
Example 2: how to fill nan values with mean in pandas
df.fillna(df.mean())
df['DataFrame Column'] = df['DataFrame Column'].fillna(0)
df.fillna(df.mean())