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

Reading the first N rows #61

Open
iscalprog opened this issue May 7, 2018 · 5 comments
Open

Reading the first N rows #61

iscalprog opened this issue May 7, 2018 · 5 comments

Comments

@iscalprog
Copy link

Sometimes it is useful to read just the first N rows, before reading everything. Is there a recommend way to achieve this?

@davidanthoff
Copy link
Member

I actually would have thought that the nrows argument would control that, but apparently it doesn't.

Having the ability to only return n rows would be really, really useful. I think the API for that should just be that nrows controls that.

@jpsamaroo
Copy link

I'd like this feature to support JuliaData/JuliaDB.jl#288, where we want to parse only the header, and then pass the header to workers who will then parse the rest of the file in chunks.

@davidanthoff
Copy link
Member

#145 was the first step: it freed the name nrows for this. Next step is to add the actual functionality.

I was actually also thinking to breaking out a separate function that just gets you the header, so that one doesn't have to use nrows=0 to do that. I also have a use case for that (a purely streaming mode that doesn't allocate any result vectors inside TextParse.jl). Just wondering whether that would also be useful for what you are working on?

@jpsamaroo
Copy link

The separate header-parsing function would be super useful, and would allow me to finish the current PR I'm working on!

A streaming interface would be interesting, although I'm not yet sure what I'd use it for 😄

@davidanthoff
Copy link
Member

Ok, cool. No promise on timing, but I'll try to give it a bit more priority than it has right now ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants