Trait polars::chunked_array::ops::ChunkUnique
source · [−]pub trait ChunkUnique<T> {
fn unique(&self) -> Result<ChunkedArray<T>, PolarsError>;
fn arg_unique(&self) -> Result<ChunkedArray<UInt32Type>, PolarsError>;
fn n_unique(&self) -> Result<usize, PolarsError> { ... }
fn is_unique(&self) -> Result<ChunkedArray<BooleanType>, PolarsError> { ... }
fn is_duplicated(&self) -> Result<ChunkedArray<BooleanType>, PolarsError> { ... }
fn mode(&self) -> Result<ChunkedArray<T>, PolarsError> { ... }
}
Expand description
Get unique values in a ChunkedArray
Required methods
fn unique(&self) -> Result<ChunkedArray<T>, PolarsError>
fn unique(&self) -> Result<ChunkedArray<T>, PolarsError>
Get unique values of a ChunkedArray
fn 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
fn n_unique(&self) -> Result<usize, PolarsError>
fn n_unique(&self) -> Result<usize, PolarsError>
Number of unique values in the ChunkedArray
fn is_unique(&self) -> Result<ChunkedArray<BooleanType>, PolarsError>
fn is_unique(&self) -> Result<ChunkedArray<BooleanType>, PolarsError>
Get a mask of all the unique values.
fn is_duplicated(&self) -> Result<ChunkedArray<BooleanType>, PolarsError>
fn is_duplicated(&self) -> Result<ChunkedArray<BooleanType>, PolarsError>
Get a mask of all the duplicated values.
fn mode(&self) -> Result<ChunkedArray<T>, PolarsError>
fn mode(&self) -> Result<ChunkedArray<T>, PolarsError>
This is supported on crate feature
mode
only.The most occurring value(s). Can return multiple Values