Füllen Sie fehlende Werte in Spalte Pandas mit dem Mittelwert aus
df.fillna(df.mean(), inplace=True)
Wicked Worm
df.fillna(df.mean(), inplace=True)
# Fill colB na's with avg of colA Groupings
df.groupby('colA')['colB'].transform(lambda value: value.fillna(value.mean()))
# Fill missing Lot Frontage with avg for Neighborhood
df.groupby('Neighborhood')['Lot Frontage'].transform(lambda value: value.fillna(value.mean()))
df.fillna(df.mean())