8.1
general documentation
cs_file_csv_parser.h File Reference
#include "cs_defs.h"
+ Include dependency graph for cs_file_csv_parser.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 ***). More...
 

Function Documentation

◆ cs_file_csv_parse()

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 ***).

Parameters
[in]file_nameName of the file to read
[in]separatorSeparator (int)
[in]n_headersNumber of headers (to ignore during import)
[in]n_columnsNumber of columns to read. -1 if all columns are to be read
[in]col_idxArray of indices of columns to read (if n_columns != -1)
[in]ignore_missing_tokensIgnore missing tokens (NULL)
[in]n_rowsPointer to number of rows in file
[in]n_colsPointer to number of columns in file
Returns
Pointer to newly created dataseti. Needs to be deallocated by caller