Skip to content

Commit

Permalink
BUG: modify df.iteritems to support duplicate column labels #2219
Browse files Browse the repository at this point in the history
  • Loading branch information
y-p committed Nov 11, 2012
1 parent 611cd0f commit 4a5b75b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pandas/core/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,8 @@ def keys(self):

def iteritems(self):
"""Iterator over (column, series) pairs"""
return ((k, self[k]) for k in self.columns)
for i, k in enumerate(self.columns):
yield (k,self.take([i],axis=1)[k])

def iterrows(self):
"""
Expand Down

0 comments on commit 4a5b75b

Please sign in to comment.