Trait polars_core::chunked_array::ops::ChunkUnique

source ·
pub trait ChunkUnique {
    // Required methods
    fn unique(&self) -> PolarsResult<Self>
       where Self: Sized;
    fn arg_unique(&self) -> PolarsResult<IdxCa>;

    // Provided method
    fn n_unique(&self) -> PolarsResult<usize> { ... }
}
Expand description

Get unique values in a ChunkedArray

Required Methods§

source

fn unique(&self) -> PolarsResult<Self>
where Self: Sized,

Get unique values of a ChunkedArray

source

fn arg_unique(&self) -> PolarsResult<IdxCa>

Get first index of the unique values in a ChunkedArray. This Vec is sorted.

Provided Methods§

source

fn n_unique(&self) -> PolarsResult<usize>

Number of unique values in the ChunkedArray

Implementors§

source§

impl ChunkUnique for BinaryChunked

Available on crate feature algorithm_group_by only.
source§

impl ChunkUnique for BooleanChunked

Available on crate feature algorithm_group_by only.
source§

impl ChunkUnique for StringChunked

Available on crate feature algorithm_group_by only.
source§

impl<T> ChunkUnique for ChunkedArray<T>

Available on crate feature algorithm_group_by only.
source§

impl<T: PolarsObject> ChunkUnique for ObjectChunked<T>

Available on crate features algorithm_group_by and object only.