cudf.core.column.lists.ListMethods.get#

ListMethods.get(index: int) Union[cudf.core.series.Series, cudf.core.index.GenericIndex]#

Extract element at the given index from each component

Extract element from lists, tuples, or strings in each element in the Series/Index.

Parameters
indexint
Returns
Series or Index

Examples

>>> s = cudf.Series([[1, 2, 3], [3, 4, 5], [4, 5, 6]])
>>> s.list.get(-1)
0    3
1    5
2    6
dtype: int64