<Applying within group rankings for Pandas DataFra...
# community-feeds
r
Applying within group rankings for Pandas DataFrame The problem statement has people choosing 3 items and ranking them 1 to 3. My Pandas DataFrame contains one row for each item selected, where the first column is the person's name and the second column is the ranking the person has given to the selection. Something like: df = pd.DataFrame.from_dict({ 'Name':['Alice','Alice','Alice','Bob','Bob','Bob','Charlie','Charlie','Charlie'], 'Item':[...], 'Rank':[1,2,3,3,1,2,None,None,None] }) The issue is some people did not assign rankings to...