Trait polars_core::chunked_array::ops::ChunkUnique
source · pub trait ChunkUnique<T: PolarsDataType> {
// Required methods
fn unique(&self) -> PolarsResult<ChunkedArray<T>>;
fn arg_unique(&self) -> PolarsResult<IdxCa>;
// Provided method
fn n_unique(&self) -> PolarsResult<usize> { ... }
}
Expand description
Get unique values in a ChunkedArray
Required Methods§
sourcefn unique(&self) -> PolarsResult<ChunkedArray<T>>
fn unique(&self) -> PolarsResult<ChunkedArray<T>>
Get unique values of a ChunkedArray
sourcefn arg_unique(&self) -> PolarsResult<IdxCa>
fn arg_unique(&self) -> PolarsResult<IdxCa>
Get first index of the unique values in a ChunkedArray
.
This Vec is sorted.
Provided Methods§
sourcefn n_unique(&self) -> PolarsResult<usize>
fn n_unique(&self) -> PolarsResult<usize>
Number of unique values in the ChunkedArray
Implementors§
impl ChunkUnique<BinaryType> for BinaryChunked
Available on crate feature
algorithm_group_by
only.impl ChunkUnique<BooleanType> for BooleanChunked
Available on crate feature
algorithm_group_by
only.impl ChunkUnique<Float32Type> for Float32Chunked
Available on crate feature
algorithm_group_by
only.impl ChunkUnique<Float64Type> for Float64Chunked
Available on crate feature
algorithm_group_by
only.impl ChunkUnique<Utf8Type> for Utf8Chunked
Available on crate feature
algorithm_group_by
only.impl<T> ChunkUnique<T> for ChunkedArray<T>where T: PolarsIntegerType, T::Native: Hash + Eq + Ord, ChunkedArray<T>: IntoSeries,
Available on crate feature
algorithm_group_by
only.impl<T: PolarsObject> ChunkUnique<ObjectType<T>> for ObjectChunked<T>
Available on crate features
algorithm_group_by
and object
only.