polars.internals.expr.ExprListNameSpace.concat

ExprListNameSpace.concat(other: Union[List[Union[polars.internals.expr.Expr, str]], polars.internals.expr.Expr, str, polars.internals.series.Series, List[Any]]) polars.internals.expr.Expr

Concat the arrays in a Series dtype List in linear time.

Parameters
other

Columns to concat into a List Series

Examples

>>> df = pl.DataFrame(
...     {
...         "a": [["a"], ["x"]],
...         "b": [["b", "c"], ["y", "z"]],
...     }
... )
>>> df.select(pl.col("a").arr.concat("b"))
shape: (2, 1)
┌─────────────────┐
│ a               │
│ ---             │
│ list [str]      │
╞═════════════════╡
│ ["a", "b", "c"] │
├╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ ["x", "y", "z"] │
└─────────────────┘