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

BUG: Properly validate and parse nrows in read_csv #13275

Closed
wants to merge 1 commit into from

Conversation

gfyoung
Copy link
Member

@gfyoung gfyoung commented May 25, 2016

  1. Allows float values for nrows for the Python engine
  2. Prevents abuse of the nrows argument for the CParser (e.g. you can passing nrows=1.2)

Closes #10476.

Number of rows of file to read. Useful for reading pieces of large files.
If ``nrows`` is a float, it must be castable to an integer without losing
Copy link
Contributor

Choose a reason for hiding this comment

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

you don't need to add that this accepts float

Copy link
Member Author

Choose a reason for hiding this comment

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

Fair enough. Done.

@gfyoung gfyoung force-pushed the nrows-bug-validate branch 2 times, most recently from c92d123 to 600c7c6 Compare May 25, 2016 03:11
@gfyoung gfyoung force-pushed the nrows-bug-validate branch from 600c7c6 to d856051 Compare May 25, 2016 03:12
@gfyoung
Copy link
Member Author

gfyoung commented May 25, 2016

@jreback : Made the requested changes, and Travis is still giving the green light. Ready to merge if there is nothing else.

@jreback jreback added Error Reporting Incorrect or improved errors from pandas IO CSV read_csv, to_csv labels May 25, 2016
@jreback jreback added this to the 0.18.2 milestone May 25, 2016
@jreback jreback closed this in b638f18 May 25, 2016
@jreback
Copy link
Contributor

jreback commented May 25, 2016

short and sweet! nice! thanks @gfyoung

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

2 participants