Dataset
Dataset(*, table: Annotated[ibis.expr.types.relations.Table, <strawberry.types.private.StrawberryPrivate object at 0x7f78f11c0dd0>])
Usage
Dataset()Methods
| Name | Description |
|---|---|
| any() |
Whether there are at least limit rows.
|
| asof_join() | As-of join on nearest key rather than equal keys. |
| cast() | Cast the columns of a table. |
| column() | Column of any type by name. |
| columns() | Fields for each column. |
| cross_join() | Cross join with one or more tables. |
| difference() | Set difference of tables. |
| distinct() | Remove duplicate rows from table. |
| drop_null() | Drop rows with null values. |
| fill_null() | Fill null values. |
| filter() | Filter rows by predicates. |
| first() | Sort and filter by maximum 1-based rank. |
| group() | Group table by columns. |
| intersect() | Set intersection of tables. |
| join() | Join two tables. |
| materialize() | Materialize an in-memory table. |
| optional() | Nullable field to stop error propagation, enabling partial query results. |
| order() | Sort table by columns. |
| project() | Mutate columns by expressions. |
| resolve() | Cache the table if it will be reused. |
| resolve_reference() | Return table filtered by federated keys. |
| row() | Scalar values at index. |
| runs() | Group table by adjacent values in columns. |
| select() | Return minimal schema needed to continue. |
| slice() | Limit row selection. |
| sql() | Run a SQL query against a table expression. |
| take() | Take rows by index. |
| to_sql() | Compile to a formatted SQL string. |
| union() | Set union of tables. |
| unnest() | Unnest an array column from a table. |
| unpack() | Unpack the struct fields of each column. |
any()
Whether there are at least limit rows.
Usage
any(limit=BigInt(1))May be significantly faster than count for out-of-core data.
asof_join()
As-of join on nearest key rather than equal keys.
Usage
asof_join(
info,
right,
on,
keys=[],
rkeys=[],
tolerance=None,
scalar=Scalars(),
lname="",
rname="{name}_right"
)cast()
Cast the columns of a table.
Usage
cast(info, schema, try_=False)column()
Column of any type by name.
Usage
column(info, name, cast="", try_=False, index=[])If the column is in the schema, columns can be used instead.
columns()
Fields for each column.
Usage
columns(info)cross_join()
Cross join with one or more tables.
Usage
cross_join(info, right, lname="", rname="{name}_right")difference()
Set difference of tables.
Usage
difference(info, table, distinct=True)distinct()
Remove duplicate rows from table.
Usage
distinct(info, on=None, keep="first", counts="", order="")Differs from group by keeping all columns, and defaulting to all remaining keys. May use ibis value_counts or aggregate. Note this can have varying behavior given automatic column selection; specify on as needed.
drop_null()
Drop rows with null values.
Usage
drop_null(info, subset=None, how="any")Note this can have varying behavior given automatic column selection.
fill_null()
Fill null values.
Usage
fill_null(info, name=None, value=UNSET, scalar=Scalars())filter()
Filter rows by predicates.
Usage
filter(info, where=[], **predicates)Schema derived fields provide syntax for simple queries; where supports complex queries, combined with and.
first()
Sort and filter by maximum 1-based rank.
Usage
first(info, by, rank=1, dense=False, over=[])Differs from order with limit by including ties at the boundary. Not directly supported in ibis; requires a semi-join which may be slower.
group()
Group table by columns.
Usage
group(info, by=[], counts="", order="", aggregate=Aggregates())intersect()
Set intersection of tables.
Usage
intersect(info, table, distinct=True)join()
Join two tables.
Usage
join(info, right, keys, rkeys=[], how="inner", lname="", rname="{name}_right")materialize()
Materialize an in-memory table.
Usage
materialize(info)An alternative to implicit table caching, which may fail or only cache server side.
optional()
Nullable field to stop error propagation, enabling partial query results.
Usage
optional(info)order()
Sort table by columns.
Usage
order(info, by, limit=None, over=[])project()
Mutate columns by expressions.
Usage
project(info, columns)Renamed to not be confused with a mutation.
resolve()
Cache the table if it will be reused.
Usage
resolve(info, table)resolve_reference()
Return table filtered by federated keys.
Usage
resolve_reference(info, **keys)row()
Scalar values at index.
Usage
row(info, index=0)runs()
Group table by adjacent values in columns.
Usage
runs(info, by=[], split=[], counts="", order="_", aggregate=Aggregates())Not directly supported in ibis; requires window functions, which may be significantly slower than group.
select()
Return minimal schema needed to continue.
Usage
select(info, table)slice()
Limit row selection.
Usage
slice(info, offset=BigInt(0), limit=None)sql()
Run a SQL query against a table expression.
Usage
sql(info, query, alias="", dialect=None, params=UNSET, schema=None)take()
Take rows by index.
Usage
take(info, indices)Not supported in ibis; uses arrow take.
to_sql()
Compile to a formatted SQL string.
Usage
to_sql(dialect=None, pretty=True)union()
Set union of tables.
Usage
union(info, table, distinct=False)unnest()
Unnest an array column from a table.
Usage
unnest(info, name, offset="", keep_empty=False, order="")unpack()
Unpack the struct fields of each column.
Usage
unpack(info, names)