replace a column with average values code example
Example 1: how to fill nas on a dataframe with median
df.fillna(df.mean(), inplace=True)
Example 2: python fillna with mean in a dataframe
df["newColumName"] = df["originalColumnName"].fillna(df["originalColumnName"].mean())