Skip to content

Check inequality without null propagation

Source code

Description

Method equivalent of addition operator expr + other.

Usage

<Expr>$neq_missing(other)

Arguments

other numeric or string value; accepts expression input.

Value

Expr

See Also

Expr_neq

Examples

library("polars")

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