Expr.is_in
methodView source ↗
def is_in(other: TdExpr | Collection[Any] | Series) -> TdExpr
Categories: logic
If an element value is in the given collection.
Parameters
parameter
otherThe 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 │
└──────┴────────┘