pandas take or .ix[] breaks iterrows indexing
After using .take on a dataframe and getting a subset of rows, the new dataframe has an incorrect index.  This confuses iterrows:

In [20]: df = pandas.DataFrame(np.random.rand(5,2))

In [21]: df
Out[21]: 
          0         1
0  0.854891  0.303209
1  0.460207  0.661508
2  0.534319  0.626693
3  0.504076  0.693567
4  0.628285  0.597230

In [23]: df.take(np.flatnonzero(df[0]>0.5))
Out[23]: 
          0         1
0  0.854891  0.303209
2  0.534319  0.626693
3  0.504076  0.693567
4  0.628285  0.597230

In [24]: df.take(np.flatnonzero(df[0]>0.5)).index
Out[24]: Int64Index([0, 2, 3, 4])

In [26]: for (i,x) in df.take(np.flatnonzero(df[0]>0.5)).iterrows(): print i
0
2
3
4
