Skip to content

polars

stores.tables._polars.PolarsTableStore(path, disk_format=DiskFormat.PARQUET, mode='r', **kwargs)

Bases: TableStore

Each table is a Polars DataFrame.

append(path, data, **kwargs)

Append a Polars DataFrame to the named table.

The DataFrame must contain ensemble_id and microstate_id columns.

available()

List all table names.

check_columns(columns) classmethod

dump(**kwargs)

Dump all stored tables to files in the specified directory/prefix.

query(path, ensemble_id=None, run_id=None, microstate_id=None, filter_expr=None, **kwargs)

Query a named table by keys and/or additional expression.

PARAMETER DESCRIPTION
path

Container/table name.

TYPE: Path | str

ensemble_id

A unique identification label for an ensemble. This can be "1", "default", "exp3829", etc.

TYPE: str | None DEFAULT: None

run_id

An unique, independent run within the same ensemble. This often arises when running multiple independent molecular simulation trajectories with different random seeds.

TYPE: int | None DEFAULT: None

microstate_id

An index specifying a microstate with some relationship to order. This can be a frame in a molecular simulation trajectories, docking scores from best to worst, optimization steps, etc.

TYPE: int | None DEFAULT: None

filter_expr

string expression to filter rows.

TYPE: str | None DEFAULT: None

read(path, view=None, **kwargs)

Read the entire table with the given name.

Raises KeyError if the table does not exist.

write(path, data, view=None, **kwargs)

Write a Polars DataFrame to the named table.

The DataFrame must contain ensemble_id, run_id, and microstate_id columns.