Expr.eq_missing
methodView source ↗
def eq_missing(other: Any) -> Expr
Categories: logic
Compare if 2 expressions are equal an, equivalent to expr == other. If one
of the expressions is null (None) it returns false.
Parameters
parameter
otherThe value to compare with.
Examples
>>> import tabsdata as td
>>>
>>> tf: td.TableFrame ...
>>>
>>> tf = tf.select(td.col("a").eq(td.col("b")).alias("eq_missing"))
>>>
┌─────┬──────┬───────────┐
│ a ┆ b ┆ eq_missing│
│ --- ┆ --- ┆ --- │
│ f64 ┆ f64 ┆ bool │
╞═════╪══════╪═══════════╡
│ 1.0 ┆ 2.0 ┆ false │
│ 2.0 ┆ 2.0 ┆ true │
│ NaN ┆ NaN ┆ true │
│ 4.0 ┆ NaN ┆ false │
│ 5.0 ┆ null ┆ false │
│ null┆ null ┆ true │
└─────┴──────┴───────────┘