title: How to iterate through rows of a dataframe and check whether value in a column row is NaN
body: <p>I have a beginner question. I have a dataframe I am iterating over and I want to check if a value in a column2 row is <code>NaN</code> or not, to perform an action on this value if it is not <code>NaN</code>. My DataFrame looks like this:</p>
  
  <pre><code>df:
  
    Column1  Column2
  0    a        hey
  1    b        NaN
  2    c        up
  </code></pre>
  
  <p>What I am trying right now is:</p>
  
  <pre><code>for item, frame in df['Column2'].iteritems():
      if frame.notnull() == True:
          print 'frame'
  </code></pre>
  
  <p>The thought behind that is that I iterate over the rows in column 2 and <code>print</code> frame for every row that has a value (which is a string). What I get however is this:</p>
  
  <pre><code>AttributeError                            Traceback (most recent call last)
  &lt;ipython-input-80-8b871a452417&gt; in &lt;module&gt;()
        1 for item, frame in df['Column2'].iteritems():
  ----&gt; 2     if frame.notnull() == True:
        3         print 'frame'
  
  AttributeError: 'float' object has no attribute 'notnull'
  </code></pre>
  
  <p>When I only run the first line of my code, I get </p>
  
  <pre><code>0
  hey
  1
  nan
  2
  up
  </code></pre>
  
  <p>which suggests that the floats in the output of the first line are the cause of the error. Can anybody tell me how I can accomplish what I want?</p>