-
- Notifications
You must be signed in to change notification settings - Fork 19.4k
Closed
Labels
AlgosNon-arithmetic algos: value_counts, factorize, sorting, isin, clip, shift, diffNon-arithmetic algos: value_counts, factorize, sorting, isin, clip, shift, diffEnhancementNumeric OperationsArithmetic, Comparison, and Logical operationsArithmetic, Comparison, and Logical operations
Milestone
Description
scipy.stats.rankdata has five ranking methods: average, min, and max, equivalent to the same options in Series.rank; ordinal, corresponding to our first; but it also has dense:
'dense': Like 'min', but the rank of the next highest element is assigned the rank immediately after those assigned to the tied elements. For example,
>>> scipy.stats.rankdata([3,1,2,1,3], "min") array([ 4., 1., 3., 1., 4.]) >>> scipy.stats.rankdata([3,1,2,1,3], "dense") array([ 3., 1., 2., 1., 3.]) I've wanted this in the past, and it just showed up on SO.
Metadata
Metadata
Assignees
Labels
AlgosNon-arithmetic algos: value_counts, factorize, sorting, isin, clip, shift, diffNon-arithmetic algos: value_counts, factorize, sorting, isin, clip, shift, diffEnhancementNumeric OperationsArithmetic, Comparison, and Logical operationsArithmetic, Comparison, and Logical operations