--fillna product_mean = df['product'].mean() df['product'] = df['product'].fillna(product_mean) --replace method col_mean = np.mean(df['col']) df['col'] = df['col'].replace(np.nan, col_mean)