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

Allow reading CSV as an iterator #7689

Closed
JD557 opened this issue Jul 15, 2018 · 1 comment
Closed

Allow reading CSV as an iterator #7689

JD557 opened this issue Jul 15, 2018 · 1 comment

Comments

@JD557
Copy link
Contributor

JD557 commented Jul 15, 2018

The CSV read method (https://github.com/twosigma/beakerx/blob/dbe869b27e641095db6ebc3dee4b8e66104adb1c/kernel/base/src/main/java/com/twosigma/beakerx/fileloader/CSV.java) only allows reading CSVs to a List.

This makes parsing large CSVs impossible, even if the code is something like new CSV().readFile("./large-file.csv").take(10).toList.

Adding a readIterator method would fix this (and it would also be possible to add safer methods in Scala, such as streamFile: Stream[Map[String, AnyRef]]).

@LeeTZ
Copy link
Contributor

LeeTZ commented Aug 7, 2018

Thank you for the contribution! @JD557

@JD557 JD557 closed this as completed Aug 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants