Test incorrect for csv import
See original GitHub issueThis 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.
Issue Analytics
- State:
- Created 10 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
6 Common CSV Import Errors and How to Fix Them - Flatfile
One of the most common CSV import errors is that the file is simply too large. That can be caused by too many...
Read more >Tackling the most common errors when trying to import a CSV
Go back to your CSV file, and ensure that it is UTF-8 encoded. You may have created your file in a Text Editor,...
Read more >Articles How do I resolve the errors "Invalid CSV file" or "the ...
Verify that the CSV file is formatted the same way as our sample CSV file. · Eliminate any typos, namely incorrectly spelled column...
Read more >Troubleshoot CSV Import - AppSheet Help
If the CSV Import data action fails, the following tips may help you resolve the problem. EnumList field import fails with "failed Valid_If...
Read more >How to fix the "Invalid Header" error for CSV uploads
This error is usually caused by formatting or white space changes in the header of the CSV file you're attempting to upload.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
(@gfyoung thanks for going through old issues!)
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