modin.pandas.Series.isin¶
- Series.isin(values: Union[set, list, tuple, ndarray]) Series[source] (https://github.com/snowflakedb/snowpark-python/blob/v1.21.0/src/snowflake/snowpark/modin/plugin/extensions/series_overrides.py#L36-L120)¶
Whether elements in Series are contained in values.
Return a boolean Series showing whether each element in the Series matches an element in the passed sequence of values exactly.
- Parameters:
values (set or list-like) – The sequence of values to test. Passing in a single string will raise a
TypeError. Instead, turn a single string into a list of one element.- Returns:
Series of booleans indicating if each element is in values.
- Return type:
- Raises:
TypeError –
If values is a string
See also
DataFrame.isinEquivalent method on DataFrame.
Examples
To invert the boolean values, use the
~operator:Passing a single string as
s.isin('llama')will raise an error. Use a list of one element instead:Strings and integers are distinct and are therefore not comparable:
Note
See pandas API documentation for pandas.Series (https://pandas.pydata.org/pandas-docs/version/2.2.1/reference/api/pandas.Series.html) for more.