📅  最后修改于: 2022-03-11 14:45:14.639000             🧑  作者: Mango
q1 = df['column'].quantile(0.25)
q3 = df['column'].quantile(0.75)
iqr = q3 - q1
df.loc[df['column'] > (q3 + 1.5 * iqr) | df['column'] < (q1 - 1.5 * iqr), 'column'] = df['column'].mean()