hipdf.core.column.lists.ListMethods.contains

hipdf.core.column.lists.ListMethods.contains#

20 min read time

Applies to Linux

ListMethods.contains(search_key: Any) Series | GenericIndex#

Returns boolean values indicating whether the specified scalar is an element of each row.

Parameters#

search_keyscalar

element being searched for in each row of the list column

Returns#

Series or Index

Examples#

>>> s = cudf.Series([[1, 2, 3], [3, 4, 5], [4, 5, 6]])
>>> s.list.contains(4)
Series([False, True, True])
dtype: bool