Skip to content

Check equality without null propagation

Source code

Description

Method equivalent of addition operator expr + other.

Usage

<Expr>$eq_missing(other)

Arguments

other numeric or string value; accepts expression input.

Value

Expr

See Also

Expr_eq

Examples

library(polars)

df = pl$DataFrame(x = c(NA, FALSE, TRUE), y = c(TRUE, TRUE, TRUE))
df$with_columns(
  eq = pl$col("x")$eq("y"),
  eq_missing = pl$col("x")$eq_missing("y")
)
#> shape: (3, 4)
#> ┌───────┬──────┬───────┬────────────┐
#> │ x     ┆ y    ┆ eq    ┆ eq_missing │
#> │ ---   ┆ ---  ┆ ---   ┆ ---        │
#> │ bool  ┆ bool ┆ bool  ┆ bool       │
#> ╞═══════╪══════╪═══════╪════════════╡
#> │ null  ┆ true ┆ null  ┆ false      │
#> │ false ┆ true ┆ false ┆ false      │
#> │ true  ┆ true ┆ false ┆ false      │
#> └───────┴──────┴───────┴────────────┘