cudf.core.column.lists.ListMethods.contains#
- ListMethods.contains(search_key: ScalarLike) ParentType [source]#
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