#include "cs_defs.h"Go to the source code of this file.
Functions | |
| char *** | cs_file_csv_parse (const char *file_name, const char *separator, const int n_headers, const int n_columns, const int *col_idx, const bool ignore_missing_tokens, int *n_rows, int *n_cols) |
| Parse a csv file and export to a dataset (char ***). | |
| char *** cs_file_csv_parse | ( | const char * | file_name, |
| const char * | separator, | ||
| const int | n_headers, | ||
| const int | n_columns, | ||
| const int * | col_idx, | ||
| const bool | ignore_missing_tokens, | ||
| int * | n_rows, | ||
| int * | n_cols ) |
Parse a csv file and export to a dataset (char ***).
The caller is responsible for freeing the dataset when not needed anymore.
| [in] | file_name | Name of the file to read |
| [in] | separator | Separator (int) |
| [in] | n_headers | Number of headers (to ignore during import) |
| [in] | n_columns | Number of columns to read. -1 if all columns are to be read |
| [in] | col_idx | Array of indices of columns to read (if n_columns != -1) |
| [in] | ignore_missing_tokens | Ignore missing tokens (nullptr) |
| [in] | n_rows | Pointer to number of rows in file |
| [in] | n_cols | Pointer to number of columns in file |