Trait polars::chunked_array::object::ChunkSort [−][src]
pub trait ChunkSort<T> { fn sort(&self, reverse: bool) -> ChunkedArray<T>; fn sort_in_place(&mut self, reverse: bool); fn argsort(&self, reverse: bool) -> ChunkedArray<UInt32Type>; fn argsort_multiple(
&self,
_other: &[Series],
_reverse: &[bool]
) -> Result<ChunkedArray<UInt32Type>, PolarsError> { ... } }
Expand description
Sort operations on ChunkedArray
.
Required methods
fn sort(&self, reverse: bool) -> ChunkedArray<T>
[src]
fn sort(&self, reverse: bool) -> ChunkedArray<T>
[src]Returned a sorted ChunkedArray
.
fn sort_in_place(&mut self, reverse: bool)
[src]
fn sort_in_place(&mut self, reverse: bool)
[src]Sort this array in place.
fn argsort(&self, reverse: bool) -> ChunkedArray<UInt32Type>
[src]
fn argsort(&self, reverse: bool) -> ChunkedArray<UInt32Type>
[src]Retrieve the indexes needed to sort this array.
Provided methods
fn argsort_multiple(
&self,
_other: &[Series],
_reverse: &[bool]
) -> Result<ChunkedArray<UInt32Type>, PolarsError>
[src]
fn argsort_multiple(
&self,
_other: &[Series],
_reverse: &[bool]
) -> Result<ChunkedArray<UInt32Type>, PolarsError>
[src]Retrieve the indexes need to sort this and the other arrays.
Implementors
pub fn argsort_multiple(
&self,
other: &[Series],
reverse: &[bool]
) -> Result<ChunkedArray<UInt32Type>, PolarsError>
[src]
pub fn argsort_multiple(
&self,
other: &[Series],
reverse: &[bool]
) -> Result<ChunkedArray<UInt32Type>, PolarsError>
[src]Panics
This function is very opinionated. On the implementation of ChunkedArray<T>
for numeric types,
we assume that all numeric Series
are of the same type.
In this case we assume that all numeric Series
are f64
types. The caller needs to
uphold this contract. If not, it will panic.
impl<T> ChunkSort<T> for ChunkedArray<T> where
T: PolarsNumericType,
<T as ArrowPrimitiveType>::Native: PartialOrd<<T as ArrowPrimitiveType>::Native>,
[src]
impl<T> ChunkSort<T> for ChunkedArray<T> where
T: PolarsNumericType,
<T as ArrowPrimitiveType>::Native: PartialOrd<<T as ArrowPrimitiveType>::Native>,
[src]pub fn argsort_multiple(
&self,
other: &[Series],
reverse: &[bool]
) -> Result<ChunkedArray<UInt32Type>, PolarsError>
[src]
pub fn argsort_multiple(
&self,
other: &[Series],
reverse: &[bool]
) -> Result<ChunkedArray<UInt32Type>, PolarsError>
[src]Panics
This function is very opinionated.
We assume that all numeric Series
are of the same type, if not it will panic