pyspark.sql.Column.isin¶
-
Column.
isin
(*cols: Any) → pyspark.sql.column.Column¶ A boolean expression that is evaluated to true if the value of this expression is contained by the evaluated values of the arguments.
Examples
>>> df[df.name.isin("Bob", "Mike")].collect() [Row(age=5, name='Bob')] >>> df[df.age.isin([1, 2, 3])].collect() [Row(age=2, name='Alice')]