polars::chunked_array::ops

Trait ChunkUnique

Source
pub trait ChunkUnique {
    // Required methods
    fn unique(&self) -> Result<Self, PolarsError>
       where Self: Sized;
    fn arg_unique(&self) -> Result<ChunkedArray<UInt32Type>, PolarsError>;

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

Get unique values in a ChunkedArray

Required Methods§

Source

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

Get unique values of a ChunkedArray

Source

fn arg_unique(&self) -> Result<ChunkedArray<UInt32Type>, PolarsError>

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

Provided Methods§

Source

fn n_unique(&self) -> Result<usize, PolarsError>

Number of unique values in the ChunkedArray

Implementors§