Null tokens
Preserve empty cells by default; explicitly opt into empty-as-null if the source uses blank fields for missing data.
let data = csv::read("train.csv", "<empty>,NA");Standard plugin ยท import "csv"
Read delimited text into typed tables, control how values are interpreted, and write table results back to disk.
Read
csv::readcsv::read(path: String, nulls: String = "", delimiter: String = ",", has_header: Bool = true, schema: String = "") -> DataFrame
With default arguments, the first row supplies column names and Ibex infers integer, floating-point, and string/categorical columns. The optional arguments let a script describe common variations without preprocessing the file.
| Argument | Default | Purpose |
|---|---|---|
path | required | Local path to the CSV file. |
nulls | "" | Comma-separated tokens to interpret as null. Use <empty> to treat empty fields as null too. |
delimiter | "," | Single field delimiter, for example ";" for semicolon-separated files. Quoted fields are parsed with CSV quoting rules. |
has_header | true | When false, generate column names col1, col2, and so on. |
schema | "" | Optional comma-separated type hints, in file column order. Use this when the schema is known and inference is unnecessary. |
Examples
Preserve empty cells by default; explicitly opt into empty-as-null if the source uses blank fields for missing data.
let data = csv::read("train.csv", "<empty>,NA");Skip type inference when the input layout is fixed. Headerless columns are named from col1.
let data = csv::read("measurements.txt", "", ";", false, "cat,f64");import "csv";
let trades = csv::read("data/trades.csv");
trades[filter qty > 0, select { symbol, qty, price }];
Write
csv::writecsv::write(df: DataFrame, path: String) -> Int writes a header followed by the rows of df. It returns the number of rows written.
let summary = trades[select { total = sum(qty) }, by symbol];
let rows_written = csv::write(summary, "out/summary.csv");For a complete CSV-to-Parquet batch job and further options, see the I/O guide.