intent: Faster way to rank rows in subgroups in pandas dataframe
rewritten_intent: Get rank of rows from highest to lowest of dataframe `df`, grouped by value in column `group`, according to value in column `value`
snippet: df.groupby('group')['value'].rank(ascending=False)