polars.Expr.approx_unique# Expr.approx_unique() → Self[source]# Approx count unique values. This is done using the HyperLogLog++ algorithm for cardinality estimation. Examples >>> df = pl.DataFrame({"a": [1, 1, 2]}) >>> df.select(pl.col("a").approx_unique()) shape: (1, 1) ┌─────┐ │ a │ │ --- │ │ u32 │ ╞═════╡ │ 2 │ └─────┘