Crear una funcion en pyhton que me impute los outliers por la media mas 3 desviaciónes estandar
def outliers (DF): df = DF for col in df.columns: u_bound = df[col].mean() + 3* df[col].std() l_bound = df[col].mean() - 3* df[col].std() df[col] = np.where(df[col] > u_bound, u_bound, df[col]) df[col] = np.where(df[col] < l_bound, l_bound, df[col]) return df outliers(df)