Skip to content

Check inequality without null propagation

Description

Method equivalent of addition operator expr + other.

Usage

<Expr>$ne_missing(other)

Arguments

other Element to add. Can be a string (only if expr is a string), a numeric value or an other expression.

Value

A polars expression

See Also

expr__ne

Examples

library("polars")

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