pandas fillna with mean of group code example
Example: python fillna with mean in a dataframe
df["newColumName"] = df["originalColumnName"].fillna(df["originalColumnName"].mean())
df["newColumName"] = df["originalColumnName"].fillna(df["originalColumnName"].mean())