cudf.core.column.lists.ListMethods.leaves#

property ListMethods.leaves: Series | Index#

From a Series of (possibly nested) lists, obtain the elements from the innermost lists as a flat Series (one value per row).

Returns:
Series or Index

Examples

>>> a = cudf.Series([[[1, None], [3, 4]], None, [[5, 6]]])
>>> a.list.leaves
0       1
1    <NA>
2       3
3       4
4       5
5       6
dtype: int64