question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Test incorrect for csv import

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 10 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
jorisvandenbosschecommented, Jul 26, 2016

(@gfyoung thanks for going through old issues!)

0reactions
jorisvandenbosschecommented, Jul 26, 2016

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found