polars_core::chunked_array::ops

Trait 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.