|
Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
|
CSV → DataFrame loader with basic type handling. More...
#include <CSVReader.h>
Public Member Functions | |
| DataFrame | read_csv (const std::string &filename, CSVOptions options=CSVOptions()) |
| Read a CSV file and construct a DataFrame. | |
CSV → DataFrame loader with basic type handling.
CSVReader provides a single high-level method read_csv which:
If a column type is not specified in CSVOptions::columnTypes, it defaults to double and the option map is updated accordingly.
Definition at line 36 of file CSVReader.h.
| DataFrame CSVReader::read_csv | ( | const std::string & | filename, |
| CSVOptions | options = CSVOptions() |
||
| ) |
Read a CSV file and construct a DataFrame.
The file is expected to have a header line with column names. Types and index behavior are controlled via the options argument:
The returned DataFrame has its internal CSVOptions synchronized with the effective options used during parsing.
| filename | Path to the CSV file on disk. |
| options | Parsing options (column types, index presence). |
| std::runtime_error | If the file cannot be opened. |
| std::invalid_argument | If an unsupported column type is requested. |
Definition at line 45 of file CSVReader.cpp.