title: Iterating a data-frame column: TypeError: 'float' object is not subscriptable
body: <p>I have a data-frame (<code>df</code>) with a column called <code>Id</code> which looks like</p>
  
  <pre><code>        Id
   0       3
   1      67
   2     356
   3      
   :
  50      P4
  51      P5
  52     678
  53 
  54       2
  </code></pre>
  
  <p>The column has a type: <code>dtype: object</code>
  I have worked out the maximum Id value and assigned to a variable called maxId (which is 678 and am looking to apply a sequentially increasing maxId to the empty elements so in this example my output would be:</p>
  
  <pre><code>        Id
   0       3
   1      67
   2     356
   3     679
   :
  50      P4
  51      P5
  52     678
  53     680
  54       2
  </code></pre>
  
  <p>Where element 3 and 53 are assigned values of 679 and 680 respectively.</p>
  
  <p>I have tried the following code where i loop through the column looking for null elements and then applythuing the maxId to these:</p>
  
  <pre><code>for item, frame in df['Id'].iteritems():
          if pd.isnull(frame):
              maxId = maxId + 1
              frame['Id'] = maxId 
  </code></pre>
  
  <p>But I get an error:</p>
  
  <blockquote>
    <p>TypeError: 'float' object is not subscriptable</p>
  </blockquote>
  
  <p>What do I need to do for a fix?</p>