#Removing outliers first then skewness from scipy.stats import zscore z=abs(zscore(df)) print(z.shape) df=df[(z<3).all(axis=1)] df.shape