I have a non null dataframe df which has about 100 columns. I want to remove outliers from each column, for which I'm doing the following.
df1 = df[np.abs(df - df.mean()) <= (3*df.std())]
I would expect df1 to contain lesser number of records than df but using the above method, shape remains same. In addition it is also creating a lof of null values.
My understanding is that its removing outliers but in place of the outliers now I have nulls. Is my understanding correct?