pandas.api.extensions.ExtensionArray.isin#

ExtensionArray.isin(values)[source]#

Pointwise comparison for set containment in the given values.

Roughly equivalent to np.array([x in values for x in self])

Parameters:
valuesnp.ndarray or ExtensionArray

Values to compare every element in the array against.

Returns:
np.ndarray[bool]

With true at indices where value is in values.

See also

DataFrame.isin

Whether each element in the DataFrame is contained in values.

Index.isin

Return a boolean array where the index values are in values.

Series.isin

Whether elements in Series are contained in values.

Examples

>>> arr = pd.array([1, 2, 3])
>>> arr.isin([1])
<BooleanArray>
[True, False, False]
Length: 3, dtype: boolean