title: Create set from pandas series with NaN's
body: <p>I'm using pandas to clean some data files and validate the content. In the validation, I compare the content of each column with a set of expected values by</p>
  
  <pre><code>for col_name, expected in expected_dict.items():
      col_values = set(df[col_name])
      if not col_values.issubset(expected):
          raise ValueError(str(col_values - expected),'in',col_name)
  </code></pre>
  
  <p>I'm running into some unexpected behavior with NaN's. Specifically,  <code>set(series)</code> treats each NaN as a unique element. I figured out a solution, which is <code>set(series.unique())</code>.</p>
  
  <pre><code>s = pd.Series([1,2,1,None,3,None])
  set(s) ## Produces {nan, 1.0, 2.0, 3.0, nan}
  set(s.unique()) ## Produces {nan, 1.0, 2.0, 3.0}
  </code></pre>
  
  <p>My question is really why this is the behavior is encountered? I suspect it is related to the representation of NaN's in pandas. </p>