ClikaRT::tables
namespace
Classes
| Name | Description |
|---|---|
CsvReadOptions | Options for Table::read_csv / read_csv_string. Column dtypes are inferred; an empty unquoted field is always null, and an unquoted field equal to one of null_tokens also becomes null. |
Table | A columnar dataframe: an ordered set of named, typed columns sharing one row count (see the file overview for the model). Build with create() + add_column / read_csv, read columns back as tensors, iterate rows with rows(), transform with the verb methods, and mutate columns in place via frame[name]. |
Functions
json_array_to_csv_string()
std::string json_array_to_csv_string(std::string_view json_text)
Render a JSON array-of-objects ([{...}, {...}]) straight to CSV text, the whole DOM → frame → CSV round trip runs inside the library, so a consumer that links only the shipped .so gets CSV without ever holding a Table by value. The objects' keys become columns (first-seen order); a missing key or a JSON null is an empty cell. Raises ClikaRT::Error on malformed JSON or a value that is not an array of objects. json_text is read during the call, not retained.
Declared in ClikaRT/tables/table.h, line 368
csv_string_to_json_array()
std::string csv_string_to_json_array(std::string_view csv_text)
The reverse text entry: a CSV table text (a header row plus rows, the text Table::to_csv_string writes) straight to a JSON array-of-objects text, one object per row keyed by the header, cells typed as the CSV reader infers them (a number stays a number; an empty cell is JSON null). The whole CSV → frame → JSON round trip runs inside the library, so a consumer that links only the shipped .so reads a table's rows without ever holding a Table by value. Raises ClikaRT::Error on a text that is not a CSV table. csv_text is read during the call, not retained.
Declared in ClikaRT/tables/table.h, line 381
ClikaRT/tables/table.h
#include <ClikaRT/tables/table.h>
ClikaRT::tables::Table: a columnar dataframe, an ordered set of named, typed columns sharing one row count. Positional rows (no labeled index). Build it from named Tensor columns (and string columns), print it pandas-style, read a column back as a Tensor, and mutate columns in place with pandas-style assignment:
frame["price"] -= 5; // in-place, on the live column
frame["bonus"] *= 1.5;
frame["total"] = some_tensor; // create or replace a column
Every fallible call returns Result<T> (the library never throws); the assignment proxy raises ClikaRT::Error on your side via value_or_throw so frame["x"] -= 5; reads naturally. Backed by the same engine as the internal tables module; numeric work lowers to the compute kernels.