title: DataFrame is confused, throws "'Series' object has no attribute 'iterrows'"
body: <p>Getting kind of an obscure error while performing actions on a DataFrame. Context goes like this:</p>
  
  <pre><code>res2 = group.z.agg(['mean', 'std', len])
  res2 = res2.drop(res2[np.isnan(res2.len)].index).drop(res2[res2.len &lt;= 5.].index)
  print(type(res2))
  res2 = res2.transform(uncert)
  </code></pre>
  
  <p>First I'm doing this. The print gives </p>
  
  <pre><code>&lt;class 'pandas.core.frame.DataFrame'&gt;
  </code></pre>
  
  <p>So far so good. Now the 'uncert' function I'm calling in transform looks like this:</p>
  
  <pre><code>def uncert(df):
     values = []
     for index, row in df.iterrows():
         print(row.mean, row.std)
         #values.append(ufloat(row['mean'], row['std']))
     #df['uval'] = Series(values, index=df.index)
     return df
  </code></pre>
  
  <p>Commented out the two lines to check what was going on. Now, ithrows an error:</p>
  
  <pre><code>AttributeError                            Traceback (most recent call last)
  &lt;ipython-input-4-e41277533a08&gt; in &lt;module&gt;()
       66     res2 = res2.drop(res2[np.isnan(res2.len)].index).drop(res2[res2.len &lt;= 5.].index)
       67     print(type(res2))
  ---&gt; 68     res2 = res2.transform(uncert)
       69 
       70     print('Method 2:\n', res2, "\n\n")
  
  .
  .
  .
  
  
  &lt;ipython-input-6-e41277533a08&gt; in uncert(df)
       13 def uncert(df):
       14     values = []
  ---&gt; 15     for index, row in df.iterrows():
       16         print(row.mean, row.std)
       17         #values.append(ufloat(row['mean'], row['std']))
  
  .
  .
  .
  AttributeError: ("'Series' object has no attribute 'iterrows'", 'occurred at index mean')
  </code></pre>
  
  <p>Aaaand this kind of doesn't make sense to me, since I am performing the action on a DataFrame object. The frame looks like this btw:</p>
  
  <pre><code>                     mean       std    len
  (-0.001, 29.409]    2.198392  0.027809   40.0
  (29.409, 75.024]    1.950194  0.008493   49.0
  (78.625, 203.464]   1.766212  0.014613  145.0
  (205.264, 215.468]  1.604461  0.008790   10.0 
  </code></pre>
  
  <p>Anybody got a clue or experienced something similar?</p>