Suggestion: percentile ranks #5971
Labels
Algos
Non-arithmetic algos: value_counts, factorize, sorting, isin, clip, shift, diff
Enhancement
Groupby
Numeric Operations
Arithmetic, Comparison, and Logical operations
Milestone
I realize I am computing percentile ranks constantly in my code.
df["pct_rank"] = df["field"].groupby("date").transform(lambda x: x.rank(ascending=False) / float(x.count()))
Would anyone have any use for a function that is computed in cython for this?
if so, would people prefer to it to be a separate function or an option in rank?
The text was updated successfully, but these errors were encountered: