I have a dataframe like this
name event spending
abc A 500
abc B 300
abc C 200
xyz A 2000
xyz D 1000
So i need a groupby name and event and calculate respective percentile...so output should be like
name event spending_percentile
abc A 50%
abc B 30%
abc C 20%
xyz A 66.67%
xyz D 33.33%
Please guide how to do this in pandas Dataframe.