polars.Series.map.len#

Series.map.len() → Series[source]#

Get the number of entries of every map.

engine:In MemoryStreamingDistributed
Returns:
Series

Series of data type UInt32.

Examples

>>> s = pl.Series(
...     [{"a": 1, "b": 2}, {}, None], dtype=pl.Map(pl.String, pl.Int64)
... )
>>> s.map.len()
shape: (3,)
Series: '' [u32]
[
        2
        0
        null
]