polars.Series.str.explode#

Series.str.explode() Series[source]#

Returns a column with a separate row for every string character.

Returns:
Series

Series of data type Utf8.

Examples

>>> s = pl.Series("a", ["foo", "bar"])
>>> s.str.explode()
shape: (6,)
Series: 'a' [str]
[
        "f"
        "o"
        "o"
        "b"
        "a"
        "r"
]