-
Notifications
You must be signed in to change notification settings - Fork 192
Open
Description
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++.
epagone, minhqdao and sebastian-mutz
Activity
arjenmarkus commentedon Nov 5, 2024
sakamoti commentedon 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 commentedon 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.
feenberg commentedon Feb 2, 2025
Can you say more about what you would expect from such a feature beyond what a list directed read can do? Would it be faster than the list directed read? Did you expect to avoid declaring the variables in the Fortran source? That would be super convenient, but probably out-of-scope for a compiled language like Fortran.