pandas.Series.list.len#

Series.list.len()[source] #

Return the length of each list in the Series.

Returns:
pandas.Series

The length of each list.

Examples

>>> import pyarrow as pa
>>> s = pd.Series(
...  [
...  [1, 2, 3],
...  [3],
...  ],
...  dtype=pd.ArrowDtype(pa.list_(
...  pa.int64()
...  ))
... )
>>> s.list.len()
0 3
1 1
dtype: int32[pyarrow]