argsort_categorical_custom

Function argsort_categorical_custom 

Source
pub fn argsort_categorical_custom<T: Ord + Copy + Zero + NumCast + Integer>(
    cat: &CategoricalArray<T>,
    category_order: &[&str],
    descending: bool,
) -> Vec<usize>
Expand description

Argsort for CategoricalArray with custom category order

Sorts by a user-defined category order. Categories not in the order list are sorted after those in the list, in lexical order. Nulls sort first (ascending) or last (descending).