Trait polars::prelude::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§
sourcefn unique(&self) -> Result<Self, PolarsError>where
Self: Sized,
fn unique(&self) -> Result<Self, PolarsError>where
Self: Sized,
Get unique values of a ChunkedArray
sourcefn arg_unique(&self) -> Result<ChunkedArray<UInt32Type>, PolarsError>
fn arg_unique(&self) -> Result<ChunkedArray<UInt32Type>, PolarsError>
Get first index of the unique values in a ChunkedArray
.
This Vec is sorted.
Provided Methods§
sourcefn n_unique(&self) -> Result<usize, PolarsError>
fn n_unique(&self) -> Result<usize, PolarsError>
Number of unique values in the ChunkedArray
Implementors§
impl ChunkUnique for ChunkedArray<BinaryType>
impl ChunkUnique for ChunkedArray<BooleanType>
impl ChunkUnique for ChunkedArray<StringType>
impl<T> ChunkUnique for ChunkedArray<ObjectType<T>>where
T: PolarsObject,
Available on crate feature
object
only.