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§
sourcefn unique(&self) -> PolarsResult<Self>where
Self: Sized,
fn unique(&self) -> PolarsResult<Self>where
Self: Sized,
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 for BinaryChunked
Available on crate feature
algorithm_group_by
only.impl ChunkUnique for BooleanChunked
Available on crate feature
algorithm_group_by
only.impl ChunkUnique for StringChunked
Available on crate feature
algorithm_group_by
only.impl<T> ChunkUnique for ChunkedArray<T>where
T: PolarsNumericType,
T::Native: TotalHash + TotalEq + ToTotalOrd,
<T::Native as ToTotalOrd>::TotalOrdItem: Hash + Eq + Ord,
ChunkedArray<T>: IntoSeries + for<'a> ChunkCompare<&'a ChunkedArray<T>, Item = BooleanChunked>,
Available on crate feature
algorithm_group_by
only.impl<T: PolarsObject> ChunkUnique for ObjectChunked<T>
Available on crate features
algorithm_group_by
and object
only.