Isi nilai yang hilang di panda kolom dengan rata -rata
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()))
sub2['income'].fillna((sub2['income'].mean()), inplace=True)