Result

Result(expr, meta=dict())

Lazy result: holds an Ibis table expression and optional metadata.

Use .collect(limit=None) to get a pandas DataFrame, or .compute(cdm, name, …) to persist as a table and get an Ibis reference.

Methods

Name Description
collect Materialize to a pandas DataFrame. Optionally limit rows.
compute Persist to a table and return Ibis table reference.

collect

Result.collect(limit=None)

Materialize to a pandas DataFrame. Optionally limit rows.

Parameters

Name Type Description Default
limit int or None If set, limit number of rows (for table expressions). None

Returns

Name Type Description
pandas.DataFrame Materialized result (or CDM snapshot if this is a snapshot Result).

compute

Result.compute(cdm, name, *, schema=None, overwrite=False)

Persist to a table and return Ibis table reference.

Parameters

Name Type Description Default
cdm Cdm or Any CDM reference (must be database-backed for table write). required
name str Table name in write schema. required
schema str or dict or None Override schema for write (default: cdm.write_schema). None
overwrite bool If True, replace existing table (default False). False

Returns

Name Type Description
Any Ibis table reference to the new table.