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

Read CSV files quickly #884

Open
Beliavsky opened this issue Nov 5, 2024 · 3 comments
Open

Read CSV files quickly #884

Beliavsky opened this issue Nov 5, 2024 · 3 comments

Comments

@Beliavsky
Copy link

Since R is used for analyzing large data sets, there are several libraries for reading CSV files quickly, one of them being csvread, written in C++. It would be nice to have a fast CSV file reader in Fortran, even if it's just an interface to one in C or C++.

@arjenmarkus
Copy link
Member

arjenmarkus commented Nov 5, 2024 via email

@sakamoti
Copy link
Contributor

sakamoti commented Nov 5, 2024

I have never loaded large data, so I am not sure how fast it is for your use case, but as a package for reading CSV files in Fortran, there is csv-fortran. This package is also introduced on fortran-lang.org.

@jalvesz
Copy link
Contributor

jalvesz commented Nov 5, 2024

This could be developed using to_num_from_stream. The fastest apporach I have found to load large numeric ASCII files into memory is to load it fully into a single large string and then stream throught the string pointer.

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

4 participants