polars_compute::unique

Trait GenericUniqueKernel

Source
pub trait GenericUniqueKernel {
    // Required methods
    fn unique(&self) -> Self;
    fn n_unique(&self) -> usize;
    fn n_unique_non_null(&self) -> usize;
}
Expand description

A generic unique kernel that selects the generally applicable unique kernel for an Array.

Required Methods§

Source

fn unique(&self) -> Self

Calculate the set of unique elements

Source

fn n_unique(&self) -> usize

Calculate the number of unique elements including null

Source

fn n_unique_non_null(&self) -> usize

Calculate the number of unique elements excluding null

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl GenericUniqueKernel for BooleanArray

Source§

fn unique(&self) -> Self

Source§

fn n_unique(&self) -> usize

Source§

fn n_unique_non_null(&self) -> usize

Implementors§