Jak wypełnić wartości NAN średniej w pandy
df.fillna(df.mean())
Bewildered Barracuda
df.fillna(df.mean())
# axis=1 means fillna by rows
df = df.fillna(axis=1, method='backfill')
df = df.fillna(axis=1, method='ffill')
# methods
# pad / ffill: propagate last valid observation forward to next valid.
# backfill / bfill: use next valid observation to fill gap.
df['Column_Name'].fillna(df['Column_Name'].mode()[0], inplace=True)