Skip to main content

SeriesMethods

Trait SeriesMethods 

Source
pub trait SeriesMethods: SeriesSealed {
    // Provided methods
    fn value_counts(
        &self,
        sort: bool,
        parallel: bool,
        name: PlSmallStr,
        normalize: bool,
    ) -> Result<DataFrame, PolarsError> { ... }
    fn ensure_sorted_arg(&self, operation: &str) -> Result<(), PolarsError> { ... }
    fn is_sorted(&self, options: SortOptions) -> Result<bool, PolarsError> { ... }
    fn is_sorted_any(
        &self,
        descending: Option<bool>,
        nulls_last: Option<bool>,
    ) -> Result<bool, PolarsError> { ... }
}
Available on crate feature polars-ops only.

Provided Methods§

Source

fn value_counts( &self, sort: bool, parallel: bool, name: PlSmallStr, normalize: bool, ) -> Result<DataFrame, PolarsError>

Create a DataFrame with the unique values of this Series and a column "counts" with dtype IdxType

Source

fn ensure_sorted_arg(&self, operation: &str) -> Result<(), PolarsError>

Source

fn is_sorted(&self, options: SortOptions) -> Result<bool, PolarsError>

Checks if a Series is sorted with concrete options. Tries to fail fast.

For inference of descending / nulls_last, see Self::is_sorted_any.

Source

fn is_sorted_any( &self, descending: Option<bool>, nulls_last: Option<bool>, ) -> Result<bool, PolarsError>

Implementors§