Skip to content

Aggregate all column values into a list.

Source code

Description

This function is syntactic sugar for pl$col(…)$implode().

Usage

pl$implode(...)

Arguments

Characters indicating the column names, passed to pl$col(). See ?pl_col for details.

Value

Expr

Examples

library("polars")

as_polars_df(iris)$select(pl$implode("Species"))
#> shape: (1, 1)
#> ┌─────────────────────────────────┐
#> │ Species                         │
#> │ ---                             │
#> │ list[cat]                       │
#> ╞═════════════════════════════════╡
#> │ ["setosa", "setosa", … "virgin… │
#> └─────────────────────────────────┘