title: Droping rows with outliers from specific columns
body: <p>I am building a binary classification model on a heavily unbalanced dataset(95% 1s and 5% 0s). I want to drop the rows with outliers and I used the below code:</p>
  <pre><code>from scipy import stats
  df=df[(np.abs(stats.zscore(df)) &lt; 3).all(axis=1)]
  </code></pre>
  <p>However, this code is dropping the rows that have my label 0. Is there a better way of dropping rows with outliers for all columns except the label column?</p>