Как заменить Нэн 0 в пандах
df['product']=df['product'].fillna(0)
df['context']=df['context'].fillna(0)
df
Quaint Quetzal
df['product']=df['product'].fillna(0)
df['context']=df['context'].fillna(0)
df
df['DataFrame Column'] = df['DataFrame Column'].fillna(0)
df.replace(np.nan,0)
data["Gender"].fillna("No Gender", inplace = True)
df.fillna('', inplace=True)
--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)