Skip to main content

DataFrame

typedef struct {
double *data;
int numRows;
int numCols;
char **featureNames;
} DataFrame;

Represents a matrix with names for each column.

Data is stored as a row-major flattened array.

note

Added in version 0.0.0

Struct Members

  • double* dataFlattened array
  • int numRowsNumber of rows (samples)
  • int numColsNumber of columns (features) per row
  • char** featureNamesArray of column/feature names
  • DF_addColumnint
    Adds a single column/feature to an existing DataFrame.
    Params: DataFrame *df double *data char *name
  • DF_freevoid
    Frees all allocated memory by the DataFrame.
    Params: DataFrame *df
  • DF_fromArrayDataFrame
    Creates a DataFrame with one feature from the given array.
    Params: double *data int numRows char *name