title: How to replace outliers with NaN while keeping row intact using pandas in python?
body: <p>I am working with a very large file and need to eliminate different outliers for each column.</p>
  
  <p>I have been able to find outliers and replace them with NaN, however it is turning the whole row into NaN. I'm sure that I'm missing somthing simple but I can't seem to find it.</p>
  
  <pre><code>import pandas as pd
  import numpy as np
  pd.set_option('display.max_rows', 100000)   
  pd.set_option('display.max_columns', 10)
  pd.set_option('display.width', 1000)
  
  df = pd.read_excel('example sheet.xlsx')   
  
  df = df.replace(df.loc[df['column 2']&lt;=0] ,np.nan)
  print(df)
  </code></pre>
  
  <p>How can I convert only the one value into NaN and not the whole row?</p>
  
  <p>Thanks</p>