title: How to filter in NaN (pandas)?
body: <p>I have a pandas dataframe (df), and I want to do something like:</p>
  
  <pre><code>newdf = df[(df.var1 == 'a') &amp; (df.var2 == NaN)]
  </code></pre>
  
  <p>I've tried replacing NaN with <code>np.NaN</code>, or <code>'NaN'</code> or <code>'nan'</code> etc, but nothing evaluates to True. There's no <code>pd.NaN</code>.</p>
  
  <p>I can use <code>df.fillna(np.nan)</code> before evaluating the above expression but that feels hackish and I wonder if it will interfere with other pandas operations that rely on being able to identify pandas-format NaN's later.</p>
  
  <p>I get the feeling there should be an easy answer to this question, but somehow it has eluded me. Any advice is appreciated. Thank you.</p>