Skip to content

BUG: Add exception when different number of fields present in file lines #12526

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

vlfom
Copy link

@vlfom vlfom commented Mar 4, 2016

Addresses issue in #12519 by raising exception when 'filepath_or_buffer'
in 'read_csv' contains different number of fields in input lines.

However, according to tests the behaviour reported in bug is expected (lines 376-390): https://github.com/pydata/pandas/blob/master/pandas/io/tests/test_cparser.py#L376

So should those tests be removed?

Addresses issue in pandas-dev#12519 by raising exception when 'filepath_or_buffer'
in 'read_csv' contains different number of fields in input lines.
@jreback
Copy link
Contributor

jreback commented Mar 4, 2016

need tests!

@jreback jreback added Bug IO CSV read_csv, to_csv labels Mar 5, 2016
@@ -537,9 +537,13 @@ static int end_line(parser_t *self) {
}

while (fields < ex_fields){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given your change, this can just be an if statement.

@jreback
Copy link
Contributor

jreback commented May 7, 2016

pls reopen if you like to rebase / update & add tests.

@jreback jreback closed this May 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug IO CSV read_csv, to_csv
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants