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.
See also
str.len
Python built-in function returning the length of an object.
Series.size
Returns the length of the Series.
StringMethods.len
Compute the length of each element in the Series/Index.
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]