polars.select#

polars.select(exprs: Union[str, Expr, Sequence[str | polars.internals.expr.expr.Expr], Series]) DataFrame[source]#

Run polars expressions without a context.

This is syntactic sugar for running df.select on an empty DataFrame.

Parameters:
exprs

Expressions to run

Returns:
DataFrame

Examples

>>> foo = pl.Series("foo", [1, 2, 3])
>>> bar = pl.Series("bar", [3, 2, 1])
>>> pl.select(
...     [
...         pl.min([foo, bar]),
...     ]
... )
shape: (3, 1)
┌─────┐
│ min │
│ --- │
│ i64 │
╞═════╡
│ 1   │
├╌╌╌╌╌┤
│ 2   │
├╌╌╌╌╌┤
│ 1   │
└─────┘