Larkspur tabular transforms, kept small

API reference

The public surface is intentionally small.

class Frame

MemberDescription
Frame.read_csv(path, *, delimiter=",")Lazy frame over a CSV file.
Frame.read_ndjson(path)Lazy frame over newline-delimited JSON.
Frame.from_rows(iterable)Wrap any iterable of dicts.
frame | transformAttach a transform, returning a new frame.
frame.head(n=10)Iterate the first n rows without consuming the source.
frame.collect()Materialise the whole frame into a list.
frame.write_csv(path)Write rows to CSV. Column order follows the first row.
frame.write_ndjson(path)Write rows as newline-delimited JSON.

Module functions

All transforms in the transforms list are importable from the top level, e.g. from larkspur import select, where.

Attributes

larkspur.__version__The installed version string.