Skip to main content
Version: 1.4.0

Expr.eq

def eq(other: Any) -> Expr

Categories: logic

Compare if 2 expressions are equal, equivalent to expr == other. If one of the expressions is null (None) it returns null.

Parameters

parameter
other

The value to compare with.

Examples

>>> import tabsdata as td
>>>
>>> tf: td.TableFrame ...
>>>
>>> tf = tf.select(td.col("a").eq(td.col("b")).alias("eq"))
>>>
┌─────┬──────┬───────┐
│ a ┆ b ┆ eq │
---------
│ f64 ┆ f64 ┆ bool
╞═════╪══════╪═══════╡
1.02.0 ┆ false │
2.02.0 ┆ true │
│ NaN ┆ NaN ┆ true │
4.0 ┆ NaN ┆ false │
5.0 ┆ null ┆ null │
│ null┆ null ┆ null │
└─────┴──────┴───────┘