cudf.core.column.lists.ListMethods.len#

ListMethods.len() Union[cudf.core.series.Series, cudf.core.index.GenericIndex]#

Computes the length of each element in the Series/Index.

Returns
Series or Index

Examples

>>> s = cudf.Series([[1, 2, 3], None, [4, 5]])
>>> s
0    [1, 2, 3]
1         None
2       [4, 5]
dtype: list
>>> s.list.len()
0       3
1    <NA>
2       2
dtype: int32