itertuples() fails after selecting a column twice #3873

Closed
gtakacs opened this Issue Jun 12, 2013 · 1 comment

Comments

Projects
None yet
2 participants

gtakacs commented Jun 12, 2013

The following code gives incorrect result (using pandas 0.11):

import pandas
df = pandas.DataFrame(data={"a": [1, 2, 3], "b": [4, 5, 6]})
print df[["a", "a"]].values # works
print list(df[["a", "a"]].itertuples()) # FAILS!

The last lines prints [(0, 'a', 'a'), (1, 'a', 'a')] instead of [(0, 1, 1), (1, 2, 2), (2, 3, 3)].

Member

cpcloud commented Jun 12, 2013

i can repro this...prolly a bug.

cpcloud closed this in #3879 Jun 13, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment