df['Percnt rank'] = df.reset_index().groupby(['index', 'Category'])['SCORE'
    ].apply(lambda x: (x.rank(method='dense') - 1) / (x.nunique() - 1)).values
print(df)
Pandas percentrank based on groups within each index