polars.Series.arr.len#

Series.arr.len() Series[source]#

Return the number of elements in each array.

Returns:
Series

Series of data type UInt32.

Examples

>>> s = pl.Series("a", [[1, 2], [4, 3]], dtype=pl.Array(pl.Int64, 2))
>>> s.arr.len()
shape: (2,)
Series: 'a' [u32]
[
    2
    2
]