This test appears to be incomplete: https://github.com/pydata/pandas/blob/master/pandas/io/tests/test_parsers.py#L1421
The DataFrame returned has only 1 column:
In [5]: df
Out[5]:
E
one two three four
a b 10.0032 5 0.3640
q 20.0000 4 0.1744
x q 30.0000 3 2.5838
But the data has 5:
In [8]: print text
A B C D E
one two three four
a b 10.0032 5 -0.5109 -2.3358 -0.4645 0.05076 0.3640
a q 20 4 0.4473 1.4152 0.2834 1.00661 0.1744
x q 30 3 -0.6662 -0.5243 -0.3580 0.89145 2.5838
Unless I'm mistaken, there should be 5 in the outcome too, no? I came across this fixing a different bug but wanted to make sure it's marked.
Comment From: jreback
there maybe some magic going on where it see the index names and automatically does an implicit index_col=[0,1,2,3,4]
, but I agree...then seems to be dropping the columns......marking as a bug....
Comment From: jreback
@guyrt any luck with this?
Comment From: jreback
@guyrt PR for this?
Comment From: jreback
@guyrt ?
Comment From: guyrt
sorry for delay @jreback I haven't had a chance to look at this.
Comment From: gfyoung
@jreback : I think this issue is obsolete. read_csv
tests are lot more complete these days IINM.
Comment From: jorisvandenbossche
Old test is here: https://github.com/pydata/pandas/blob/v0.12.0/pandas/io/tests/test_parsers.py#L1295, and the the current version was indeed be amended with an example that compares to the actual frame: https://github.com/pydata/pandas/blob/v0.18.1/pandas/io/tests/parser/python_parser_only.py#L168
Comment From: jorisvandenbossche
(@gfyoung thanks for going through old issues!)