title: Loop through a column of strings and NaN while avoiding NaN
body: <p>Say I have a column called <code>names</code>:</p>
  <pre><code>names
  
  name1
  NaN
  name2
  NaN
  </code></pre>
  <p>Entries like <code>name1</code> and <code>name2</code> are of type <code>str</code>, and all the NaN entries are of type <code>float</code>, in case you needed to know.</p>
  <p>I want to loop through this column to perform changes on the good entries while entirely leaving alone the NaN entries, as such:</p>
  <pre><code>for i in range(len(df[&quot;names&quot;])):
      if df['names'][i].isnull() == False:
          # do stuff
  </code></pre>
  <p>I've tried <code>isnull()</code>, <code>math.isna()</code>, but I get errors like <code>AttributeError: 'str' object has no attribute 'isnull'</code> and <code>TypeError: expected string or bytes-like object</code> when I try to apply a lambda function instead of using a for loop.</p>
  <p>How can I check if each row is <em>not</em> NaN, when all the good entries are strings?</p>