-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Closed
Labels
API DesignAlgosNon-arithmetic algos: value_counts, factorize, sorting, isin, clip, shift, diffNon-arithmetic algos: value_counts, factorize, sorting, isin, clip, shift, diffEnhancement
Milestone
Description
Many python functions (sorting, max/min) accept a key argument, perhaps they could in pandas too.
.
The terrible motivating example was this awful hack from this question.... for which maybe one could do
df.sort_index(key=lambda t: literal_eval(t[1:-1]))
This would still be an awful awful hack, but a slightly less awful one.
JoelBondurant, LCLeGoff, aasenjo, lebigot, ilivans and 6 more
Metadata
Metadata
Assignees
Labels
API DesignAlgosNon-arithmetic algos: value_counts, factorize, sorting, isin, clip, shift, diffNon-arithmetic algos: value_counts, factorize, sorting, isin, clip, shift, diffEnhancement