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

API/DOC: Specification for names parameter in read_csv #16469

Closed
gfyoung opened this issue May 24, 2017 · 4 comments · Fixed by #38445
Closed

API/DOC: Specification for names parameter in read_csv #16469

gfyoung opened this issue May 24, 2017 · 4 comments · Fixed by #38445
Labels
Bug IO CSV read_csv, to_csv
Milestone

Comments

@gfyoung
Copy link
Member

gfyoung commented May 24, 2017

On master (04356a), the documentation is unclear as to what a valid names parameter is for read_csv.

  • Does it need to have the same length as the number of columns in the file? OR
  • Does it need to have the same length as usecols if specified?

I find evidence in the test cases to support both (C engine allows both for example, but the Python engine disallows the former). This point should also be clarified in the documentation.

xref #14671.

@gfyoung
Copy link
Member Author

gfyoung commented May 31, 2017

I suspect that I would lean towards using the latter, since why specify all of the column names if you're not going to use all of them?

@jreback
Copy link
Contributor

jreback commented Sep 23, 2017

is this covered?

@gfyoung
Copy link
Member Author

gfyoung commented Sep 23, 2017

@jreback : What do you mean by this? This is just a behavior question that I'm still unsure about but was hoping to get some feedback before making any decisions.

@gfyoung
Copy link
Member Author

gfyoung commented Nov 22, 2018

Marking this as a bug because:

  • It works on the C engine (but not the Python engine)
  • This ambiguity doesn't exist when there is no existing header. It works both ways for both engines.

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 a pull request may close this issue.

3 participants