polars.internals.series.list.ListNameSpace.join#

ListNameSpace.join(separator: str) Series[source]#

Join all string items in a sublist and place a separator between them.

This errors if inner type of list != Utf8.

Parameters:
separator

string to separate the items with

Returns:
Series of dtype Utf8

Examples

>>> s = pl.Series([["foo", "bar"], ["hello", "world"]])
>>> s.arr.join(separator="-")
shape: (2,)
Series: '' [str]
[
    "foo-bar"
    "hello-world"
]