polars.Series.explode#

Series.explode() Series[source]#

Explode a list or utf8 Series.

This means that every item is expanded to a new row.

Returns:
Exploded Series of same dtype

Examples

>>> s = pl.Series("a", [[1, 2], [3, 4], [9, 10]])
>>> s.explode()
shape: (6,)
Series: 'a' [i64]
[
        1
        2
        3
        4
        9
        10
]