Skip to main content
Version: 1.1.0

Expr.is_in

def is_in(other: Expr | Collection[Any]) -> Expr

Categories: logic

If an element value is in the given collection.

Parameters

parameter
other

The collection to check if the element value is in.

Examples

>>> import tabsdata as td
>>>
>>> tf: td.TableFrame ...
>>>
>>> tf = tf.select(td.col("temp"), td.col("temp").is_in([1.1, 2.2])
>>> .alias("is_in"))
>>>
┌──────┬────────┐
│ temp ┆ is_in │
------
│ f64 ┆ bool
╞══════╪════════╡
1.1 ┆ true │
2.0 ┆ false │
│ inf ┆ false │
└──────┴────────┘