polars.internals.expr.string.ExprStringNameSpace.concat#

ExprStringNameSpace.concat(delimiter: str = '-') Expr[source]#

Vertically concat the values in the Series to a single string value.

Parameters:
delimiter

The delimiter to insert between consecutive string values.

Returns:
Series of dtype Utf8

Examples

>>> df = pl.DataFrame({"foo": [1, None, 2]})
>>> df.select(pl.col("foo").str.concat("-"))
shape: (1, 1)
┌──────────┐
│ foo      │
│ ---      │
│ str      │
╞══════════╡
│ 1-null-2 │
└──────────┘