title: 'Invalid type comparison' in the code
body: <p>I have a <code>pandas dataframe</code> which has many columns. These columns may have 3 values - True, False and NaN. I'm replcaing the <code>NaN</code> with the string <code>missing</code>. The sample values for one of my columns is as follows:</p>
  
  <pre><code>ConceptTemp.ix[:,1].values
  </code></pre>
  
  <p>resulting in:</p>
  
  <pre><code>array([ True, False, False, False,  True,  True,  True,  True, False,  True], dtype=bool)
  </code></pre>
  
  <p>Note that this particular column had no <code>NaN</code>, and therefore no <code>missing</code> string.</p>
  
  <p>Now I execute the following code:</p>
  
  <pre><code>ConceptTemp.ix[:,1][ConceptTemp.ix[:,1] != 'missing'].values
  </code></pre>
  
  <p>To get the following exception:</p>
  
  <pre><code>---------------------------------------------------------------------------
  TypeError                                 Traceback (most recent call last)
  &lt;ipython-input-47-0a0b76cf3ab5&gt; in &lt;module&gt;()
  ----&gt; 1 ConceptTemp.ix[:,1][ConceptTemp.ix[:,1] != 'missing'].values
  
  E:\Anaconda2\lib\site-packages\pandas\core\ops.pyc in wrapper(self, other, axis)
      724                 other = np.asarray(other)
      725 
  --&gt; 726             res = na_op(values, other)
      727             if isscalar(res):
      728                 raise TypeError('Could not compare %s type with Series'
  
  E:\Anaconda2\lib\site-packages\pandas\core\ops.pyc in na_op(x, y)
      680                 result = getattr(x, name)(y)
      681                 if result is NotImplemented:
  --&gt; 682                     raise TypeError("invalid type comparison")
      683             except AttributeError:
      684                 result = op(x, y)
  
  TypeError: invalid type comparison
  </code></pre>
  
  <p>Would someone know how to fix it? </p>
  
  <p>Any pointers would be highly appreciated.</p>