snowflake.snowpark.Column.in_¶
- Column.in_(*vals: Union[None, bool, int, float, str, bytearray, Decimal, date, datetime, time, bytes, NaTType, float64, list, tuple, dict, Iterable[Union[None, bool, int, float, str, bytearray, Decimal, date, datetime, time, bytes, NaTType, float64, list, tuple, dict]], Column, Iterable[Column], DataFrame]) Column[source]¶
Returns a conditional expression that you can pass to the
DataFrame.filter()or whereDataFrame.where()to perform the equivalent of a WHERE … IN query with a specified list of values. You can also pass this to aDataFrame.select()call.The expression evaluates to true if the value in the column is one of the values in a specified sequence.
For example, the following code returns a DataFrame that contains the rows where the column “a” contains the value 1, 2, or 3. This is equivalent to
SELECT * FROM table WHERE a IN (1, 2, 3).Examples:
- Parameters:
vals – The literal values, the columns in the same DataFrame, or a
DataFrameinstance to use to check for membership against this column.