Aggregate values into a list
Description
Aggregate values into a list
Usage
<Expr>$implode(..., maintain_order = TRUE)
Arguments
…
|
These dots are for future extensions and must be empty. |
maintain_order
|
Whether to preserve the order of elements in the list. Setting this to
FALSE can improve performance, especially within
$group_by().
|
Value
A polars expression
Examples
#> shape: (3, 2)
#> ┌───────────┬─────┐
#> │ a ┆ b │
#> │ --- ┆ --- │
#> │ list[i32] ┆ i32 │
#> ╞═══════════╪═════╡
#> │ [1, 2, 3] ┆ 4 │
#> │ [1, 2, 3] ┆ 5 │
#> │ [1, 2, 3] ┆ 6 │
#> └───────────┴─────┘