Applies mathematical operations on DataFrame row/column
void apply(alias Fn, int axis, T)(T index) Description: Applies a function on a particular row or column @params: Fn - Function @params: axis - 0 for rows, 1 for columns @params: index - integer or string indexes of rows
void apply(alias Fn, int axis, T)(T index) Description: apply overload - apply to all data @params: Fn - Function @params: axis - 0 for rows, 1 for columns
Get DataFrame data as a Slice
void assign(int axis, T, U...)(T index, U values) Description: Assign values to rows or column.index @params: axis - 0 for rows, 1 for column.index @params: index - string[] or integer index of the location to assign @params: values - values to assign
RowTypei2 at(size_t i1, size_t i2)() Description: Getting the element directly from its index @param: ii - Row index @param: i2 - Column index
auto columnToIndex(int position)() @property Description: Converts a column into row index level @params: position - integral index of column to be converted to index
auto display(bool getStr = false, int maxwidth = 0) Description: Converts the given DataFrame into a formatted string to display on the terminal @params: getStr - returns the string generated. @params: maxwidth - override the width of the terminal.
auto drop(int axis, int[] positions)() @property Description: Drop a row/column from DataFrame @params: axis - 0 for dropping row, 1 for dropping columns @params: positions - integer array of positions of all the rows/colmns to be dropped
from_csv rebuild for faster read
Filter the DataFrame based on the result of callback
void from_csv(string path, size_t indexDepth, size_t columnDepth, size_t[] column.index = [], char sep = ',') Description: Parsing of DataFrame from a CSV file @params: path - File path of csv file @params: indexDepth - Number of column row index span @params: columnDepth - Number of rows column index span @params: column.index - Integer row.index of column to selectively parse @params: sep - Data seperator in the file
int getColPos(string[] row.index) Description: Get integer index of the given column headers Defaults to -1 if headers don't match @params: row.index - Array of row.index
int getRowPos(string[] row.index) Description: Get integer index of the given row headers Defaults to -1 if headers don't match @params: row.index - Array of row.index
Group DataFrame rows based on column values
auto indexToData(int position, Dtype...)(int indexLevel, string[] dataIndex) Description: Convers a level of indexing to data @params: position - position to insert data at @params: DataType - Data type for the new data column @params: indexLevel - Index level to convert to data @params: dataIndex - Index for the new data column
Direct assignment of a 2D array to DataFrame Usage: df = [[1,2], [3,4]];
Assign Slice to DataFrame
Element access based on integral index Usage: df[0, 0]
Element access based on integral index Usage: df[["Index1"], ["Index2"]]
Get an entire row or column using index For column: df[["Index"]] For row: df[["Index"], 0]
void opIndexAssign(Args...)(Args ele, size_t i1, size_t i2) Description: Setting the element at an index @param: ii - Row index @param: i2 - Column index
void opIndexAssign(Args...)(Args ele, string[] rindx, string[] cindx) Description: Setting the element at an index @param: rindx - Row index @param: cindx - Column index
Column/Row binary operations df[["CIndex1"]] = df[["CIndex2"]] + df[["CIndex3"]]; df[["RIndex1"], 0] = df[["RIndex2"], 0] + df[["RIndex3"], 0];
Slice assignment operation
Short Hand operations
Slice assignment operation
void setFrameIndex(Index index) Description: Sets the frame row.index. [Please use setIndex method of Index to set the index] @params: index - Index structure to replace indexing
void to_csv(string path, bool writeIndex = true, bool writecolumn.index = true, char sep = ',') Description: Writes given DataFrame to a CSV file @params: path - path to the output file @params: writeIndex - write row index to the file @params: writecolumn.index - write column index to the file @params: sep - data seperator
DataFrame Data
DataFrame indexing
Flag to know if the DataFrame is homogeneous
The DataFrame Structure