0
I’m trying to apply this function to the dataset:
number_outliers = (df2 < (Q1 - 1.5 * IQR)) | (df2 > (Q3 + 1.5 * IQR))
df2.apply(((lambda x:df2[~((df2 < (Q1 - 1.5 * IQR)) | (df2 > (Q3 + 1.5 * IQR)))])),axis=1, broadcast=True, raw=True, reduce=True ,args=number_outliers )
return df2
Where the number_outilers is a parameter to identify the outliers and the lambda function is to remove , I don’t know where I’m going wrong , someone would have some suggestion ?