tabsdata.tableframe.expr.expr.Expr.is_in#

Expr.is_in(other: Expr | Collection[Any] | Series) Expr[source]#

If an element value is in the given collection.

Parameters:

other – The collection to check if the element value is in.

Example:

>>> 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  │
└──────┴────────┘