cudf.Index.isin#
- Index.isin(values, level=None) ndarray [source]#
Return a boolean array where the index values are in values.
Compute boolean array of whether each index value is found in the passed set of values. The length of the returned boolean array matches the length of the index.
- Parameters:
- valuesset, list-like, Index
Sought values.
- levelstr or int, optional
Name or position of the index level to use (if the index is a MultiIndex).
- Returns:
- is_containedcupy array
CuPy array of boolean values.
Examples
>>> idx = cudf.Index([1,2,3]) >>> idx Index([1, 2, 3], dtype='int64')
Check whether each index value in a list of values.
>>> idx.isin([1, 4]) array([ True, False, False])