Skip to content
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

ENH: GH34946 Check type of names argument to read_csv, read_table #34956

Merged
merged 5 commits into from
Jun 24, 2020

Conversation

MJafarMashhadi
Copy link
Contributor

@MJafarMashhadi MJafarMashhadi commented Jun 23, 2020

@MJafarMashhadi
Copy link
Contributor Author

I used is_list_like to check the type which does not consider strings as lists, would that be a problem?
In the tests whereever names argument was passed, it was a list. The doc kind of implies it expects a list too, but the type is specified as array-like which I don't think is accurate because a python list is a perfectly valid argument for that but it isn't array-like.

@WillAyd
Copy link
Member

WillAyd commented Jun 23, 2020

Can you add a test for this? I think can go in pandas/tests/io/parser/test_common.py

@WillAyd WillAyd added the IO CSV read_csv, to_csv label Jun 23, 2020
@MJafarMashhadi
Copy link
Contributor Author

Will do

@jreback jreback added Bug Error Reporting Incorrect or improved errors from pandas labels Jun 23, 2020
@jreback jreback added this to the 1.1 milestone Jun 23, 2020
@jreback jreback requested a review from gfyoung June 23, 2020 22:38
Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

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

lgtm. @gfyoung if you'd have a look.

pandas/io/parsers.py Outdated Show resolved Hide resolved
pandas/io/parsers.py Outdated Show resolved Hide resolved
@gfyoung
Copy link
Member

gfyoung commented Jun 24, 2020

Provided tests pass, lgtm

@jreback jreback merged commit 2786cda into pandas-dev:master Jun 24, 2020
@jreback
Copy link
Contributor

jreback commented Jun 24, 2020

thanks @MJafarMashhadi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Error Reporting Incorrect or improved errors from pandas IO CSV read_csv, to_csv
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: Inconsistent behavior: Occasional crash on same code and data
5 participants