Method: Polars::Expr#is_unique

Defined in:
lib/polars/expr.rb

#is_uniqueExpr

Get mask of unique values.

Examples:

df = Polars::DataFrame.new({"a" => [1, 1, 2]})
df.select(Polars.col("a").is_unique)
# =>
# shape: (3, 1)
# ┌───────┐
# │ a     │
# │ ---   │
# │ bool  │
# ╞═══════╡
# │ false │
# │ false │
# │ true  │
# └───────┘

Returns:

[View source]

2407
2408
2409
# File 'lib/polars/expr.rb', line 2407

def is_unique
  _from_rbexpr(_rbexpr.is_unique)
end