def isin(self, values: Union[(List, Dict)]) -> 'DataFrame':
    "\n        Whether each element in the DataFrame is contained in values.\n\n        Parameters\n        ----------\n        values : iterable or dict\n           The sequence of values to test. If values is a dict,\n           the keys must be the column names, which must match.\n           Series and DataFrame are not supported.\n\n        Returns\n        -------\n        DataFrame\n            DataFrame of booleans showing whether each element in the DataFrame\n            is contained in values.\n\n        Examples\n        --------\n        >>> df = ps.DataFrame({'num_legs': [2, 4], 'num_wings': [2, 0]},\n        ...                   index=['falcon', 'dog'],\n        ...                   columns=['num_legs', 'num_wings'])\n        >>> df\n                num_legs  num_wings\n        falcon         2          2\n        dog            4          0\n\n        When ``values`` is a list check whether every value in the DataFrame\n        is present in the list (which animals have 0 or 2 legs or wings)\n\n        >>> df.isin([0, 2])\n                num_legs  num_wings\n        falcon      True       True\n        dog        False       True\n\n        When ``values`` is a dict, we can pass values to check for each\n        column separately:\n\n        >>> df.isin({'num_wings': [0, 3]})\n                num_legs  num_wings\n        falcon     False      False\n        dog        False       True\n        "
    if isinstance(values, (pd.DataFrame, pd.Series)):
        raise NotImplementedError('DataFrame and Series are not supported')
    if (isinstance(values, dict) and (not set(values.keys()).issubset(self.columns))):
        raise AttributeError(("'DataFrame' object has no attribute %s" % set(values.keys()).difference(self.columns)))
    data_spark_columns = []
    if isinstance(values, dict):
        for (i, col) in enumerate(self.columns):
            if (col in values):
                item = values[col]
                item = (item.tolist() if isinstance(item, np.ndarray) else list(item))
                scol = self._internal.spark_column_for(self._internal.column_labels[i]).isin([SF.lit(v) for v in item])
                scol = F.coalesce(scol, F.lit(False))
            else:
                scol = SF.lit(False)
            data_spark_columns.append(scol.alias(self._internal.data_spark_column_names[i]))
    elif is_list_like(values):
        values = (cast(np.ndarray, values).tolist() if isinstance(values, np.ndarray) else list(values))
        for label in self._internal.column_labels:
            scol = self._internal.spark_column_for(label).isin([SF.lit(v) for v in values])
            scol = F.coalesce(scol, F.lit(False))
            data_spark_columns.append(scol.alias(self._internal.spark_column_name_for(label)))
    else:
        raise TypeError('Values should be iterable, Series, DataFrame or dict.')
    return DataFrame(self._internal.with_new_columns(data_spark_columns, data_fields=[field.copy(dtype=np.dtype('bool'), spark_type=BooleanType(), nullable=False) for field in self._internal.data_fields]))
Whether each element in the DataFrame is contained in values.

Parameters
----------
values : iterable or dict
   The sequence of values to test. If values is a dict,
   the keys must be the column names, which must match.
   Series and DataFrame are not supported.

Returns
-------
DataFrame
    DataFrame of booleans showing whether each element in the DataFrame
    is contained in values.

Examples
--------
>>> df = ps.DataFrame({'num_legs': [2, 4], 'num_wings': [2, 0]},
...                   index=['falcon', 'dog'],
...                   columns=['num_legs', 'num_wings'])
>>> df
        num_legs  num_wings
falcon         2          2
dog            4          0

When ``values`` is a list check whether every value in the DataFrame
is present in the list (which animals have 0 or 2 legs or wings)

>>> df.isin([0, 2])
        num_legs  num_wings
falcon      True       True
dog        False       True

When ``values`` is a dict, we can pass values to check for each
column separately:

>>> df.isin({'num_wings': [0, 3]})
        num_legs  num_wings
falcon     False      False
dog        False       True
def isin(self, values: Union[(List, Dict)]) -> 'DataFrame':
    "\n        Whether each element in the DataFrame is contained in values.\n\n        Parameters\n        ----------\n        values : iterable or dict\n           The sequence of values to test. If values is a dict,\n           the keys must be the column names, which must match.\n           Series and DataFrame are not supported.\n\n        Returns\n        -------\n        DataFrame\n            DataFrame of booleans showing whether each element in the DataFrame\n            is contained in values.\n\n        Examples\n        --------\n        >>> df = ps.DataFrame({'num_legs': [2, 4], 'num_wings': [2, 0]},\n        ...                   index=['falcon', 'dog'],\n        ...                   columns=['num_legs', 'num_wings'])\n        >>> df\n                num_legs  num_wings\n        falcon         2          2\n        dog            4          0\n\n        When ``values`` is a list check whether every value in the DataFrame\n        is present in the list (which animals have 0 or 2 legs or wings)\n\n        >>> df.isin([0, 2])\n                num_legs  num_wings\n        falcon      True       True\n        dog        False       True\n\n        When ``values`` is a dict, we can pass values to check for each\n        column separately:\n\n        >>> df.isin({'num_wings': [0, 3]})\n                num_legs  num_wings\n        falcon     False      False\n        dog        False       True\n        "
    if isinstance(values, (pd.DataFrame, pd.Series)):
        raise NotImplementedError('DataFrame and Series are not supported')
    if (isinstance(values, dict) and (not set(values.keys()).issubset(self.columns))):
        raise AttributeError(("'DataFrame' object has no attribute %s" % set(values.keys()).difference(self.columns)))
    data_spark_columns = []
    if isinstance(values, dict):
        for (i, col) in enumerate(self.columns):
            if (col in values):
                item = values[col]
                item = (item.tolist() if isinstance(item, np.ndarray) else list(item))
                scol = self._internal.spark_column_for(self._internal.column_labels[i]).isin([SF.lit(v) for v in item])
                scol = F.coalesce(scol, F.lit(False))
            else:
                scol = SF.lit(False)
            data_spark_columns.append(scol.alias(self._internal.data_spark_column_names[i]))
    elif is_list_like(values):
        values = (cast(np.ndarray, values).tolist() if isinstance(values, np.ndarray) else list(values))
        for label in self._internal.column_labels:
            scol = self._internal.spark_column_for(label).isin([SF.lit(v) for v in values])
            scol = F.coalesce(scol, F.lit(False))
            data_spark_columns.append(scol.alias(self._internal.spark_column_name_for(label)))
    else:
        raise TypeError('Values should be iterable, Series, DataFrame or dict.')
    return DataFrame(self._internal.with_new_columns(data_spark_columns, data_fields=[field.copy(dtype=np.dtype('bool'), spark_type=BooleanType(), nullable=False) for field in self._internal.data_fields]))