CSV data source#

Class csv::data_source is an API for accessing the data source represented as a csv file. CSV data source is used with read operation to extract data in text format from the given input file, process it using provided parameters (such as delimiter and read options), transform it into numerical representation, and store it as an in-memory dataset of a chosen type.

Supported type of in-memory object for read operation with CSV data source is oneapi::dal::table.

CSV data source requires input file name to be set in the constructor, while the other parameters of the constructor such as delimiter and read options rely on default values.

Usage Example#

using namespace oneapi;

const auto data_source = dal::csv::data_source("data.csv", ',');

const auto table = dal::read<dal::table>(data_source);

Programming Interface#

Refer to API Reference: CSV data source.