Trait polars_core::chunked_array::ops::ChunkUnique
source · pub trait ChunkUnique<T: PolarsDataType> {
fn unique(&self) -> PolarsResult<ChunkedArray<T>>;
fn arg_unique(&self) -> PolarsResult<IdxCa>;
fn n_unique(&self) -> PolarsResult<usize> { ... }
fn is_unique(&self) -> PolarsResult<BooleanChunked> { ... }
fn is_duplicated(&self) -> PolarsResult<BooleanChunked> { ... }
fn mode(&self) -> PolarsResult<ChunkedArray<T>> { ... }
}
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
sourcefn is_unique(&self) -> PolarsResult<BooleanChunked>
fn is_unique(&self) -> PolarsResult<BooleanChunked>
Get a mask of all the unique values.
sourcefn is_duplicated(&self) -> PolarsResult<BooleanChunked>
fn is_duplicated(&self) -> PolarsResult<BooleanChunked>
Get a mask of all the duplicated values.
sourcefn mode(&self) -> PolarsResult<ChunkedArray<T>>
fn mode(&self) -> PolarsResult<ChunkedArray<T>>
Available on crate feature
mode
only.The most occurring value(s). Can return multiple Values
Implementors§
impl ChunkUnique<BinaryType> for BinaryChunked
Available on crate feature
dtype-binary
only.impl ChunkUnique<BooleanType> for BooleanChunked
impl ChunkUnique<Float32Type> for Float32Chunked
impl ChunkUnique<Float64Type> for Float64Chunked
impl ChunkUnique<Utf8Type> for Utf8Chunked
impl<T> ChunkUnique<T> for ChunkedArray<T>where
T: PolarsIntegerType,
T::Native: Hash + Eq + Ord,
ChunkedArray<T>: IntoSeries,
impl<T: PolarsObject> ChunkUnique<ObjectType<T>> for ObjectChunked<T>
Available on crate feature
object
only.