import pandas as pd
df = pd.DataFrame({'name': ['bob', 'pete', 'fluffy', 'max'], 'type': ['dog',
    'cat', 'dog', 'cat'], 'votes': [10, 8, 5, 9]}, index=list('AABB'))
Pandas groupby category, rating, get top value from each category?