title: How to remove nan values from a dataframe column when notnull, dropna and != 'nan' don't work?
body: <p>I have a dataframe with the following columns and datatypes:</p>
  <pre><code>np_id                     object
  target_id                 object
  activity_type             object
  activity_value            object
  activity_units            object
  assay_cell_type           object
  SMILES                    object
  standard_inchi_key        object
  standard_inchi            object
  target_type               object
  target_name               object
  target_organism_tax_id    object
  target_organism           object
  uniprot_id                object
  dtype: object
  </code></pre>
  <p><code>df.uniprot_id</code> looks like this:</p>
  <pre><code>0            [nan]
  1         [Q96KQ7]
  2            [nan]
  3         [P25779]
  4            [nan]
              ...   
  493830       [nan]
  493831       [nan]
  493832       [nan]
  493833       [nan]
  493834       [nan]
  </code></pre>
  <p>And <code>df['uniprot_id'].isnull().values.any()</code> gives <code>False</code></p>
  <p>I want to remove all rows which do not have a uniprot_id. I've tried the following:</p>
  <p><code>df.dropna(subset=['uniprot_id'], inplace=True)</code></p>
  <p><code>df = df[df['uniprot_id'] != 'nan']</code></p>
  <p><code>df = df[df['uniprot_id'] != 'NaN']</code></p>
  <p><code>df[df.uniprot_id.notnull()]</code></p>
  <p>Why are my attempts not working? How do I remove the nan values, and therefore the rows from the dataframe?</p>