parameters: (self, values)
return_statement: return algorithms.isin(self.codes, code_values)
docstring: Check whether `values` are contained in Categorical.
  
          Return a boolean NumPy Array showing whether each element in
          the Categorical 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
          -------
          isin : numpy.ndarray (bool dtype)
  
          Raises
          ------
          TypeError
            * If `values` is not a set or list-like
  
          See Also
          --------
          pandas.Series.isin : Equivalent method on Series.
  
          Examples
          --------
  
          >>> s = pd.Categorical(['lama', 'cow', 'lama', 'beetle', 'lama',
          ...                'hippo'])
          >>> s.isin(['cow', 'lama'])
          array([ True,  True,  True, False,  True, False])
  
          Passing a single string as ``s.isin('lama')`` will raise an error. Use
          a list of one element instead:
  
          >>> s.isin(['lama'])
          array([ True, False,  True, False,  True, False])
docstring_summary: Check whether `values` are contained in Categorical.
docstring_tokens: Check whether values are contained in Categorical .
function: def isin(self, values):
          """
          Check whether `values` are contained in Categorical.
  
          Return a boolean NumPy Array showing whether each element in
          the Categorical 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
          -------
          isin : numpy.ndarray (bool dtype)
  
          Raises
          ------
          TypeError
            * If `values` is not a set or list-like
  
          See Also
          --------
          pandas.Series.isin : Equivalent method on Series.
  
          Examples
          --------
  
          >>> s = pd.Categorical(['lama', 'cow', 'lama', 'beetle', 'lama',
          ...                'hippo'])
          >>> s.isin(['cow', 'lama'])
          array([ True,  True,  True, False,  True, False])
  
          Passing a single string as ``s.isin('lama')`` will raise an error. Use
          a list of one element instead:
  
          >>> s.isin(['lama'])
          array([ True, False,  True, False,  True, False])
          """
          if not is_list_like(values):
              values_type = type(values).__name__
              raise TypeError(
                  "only list-like objects are allowed to be passed"
                  f" to isin(), you passed a [{values_type}]"
              )
          values = sanitize_array(values, None, None)
          null_mask = np.asarray(isna(values))
          code_values = self.categories.get_indexer(values)
          code_values = code_values[null_mask | (code_values >= 0)]
          return algorithms.isin(self.codes, code_values)
function_tokens: def isin ( self , values ) : if not is_list_like ( values ) : values_type = type ( values ) . __name__ raise TypeError ( "only list-like objects are allowed to be passed" f" to isin(), you passed a [{values_type}]" ) values = sanitize_array ( values , None , None ) null_mask = np . asarray ( isna ( values ) ) code_values = self . categories . get_indexer ( values ) code_values = code_values [ null_mask | ( code_values >= 0 ) ] return algorithms . isin ( self . codes , code_values )