Skip to content

Test incorrect for csv import #5065

@guyrt

Description

@guyrt

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugIO CSVread_csv, to_csvTestingpandas testing functions or related to the test suite

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions