using the dataframe code at this link https://pastebin.com/d1aW7u5N
I grouped it like this df.groupby([col, 'win']).count() to achieve this output

But I want to have it be for every death, display the percentage of win/(win+loss) (basically show the win percentage) using the match id
For example, the end dataframe would look as such:
(deaths, percentage),
(0, 1) because 9 wins and 0 losses for deaths=0
(1, .77) because 7 wins and 2 losses for deaths=1 and 7/(7+2) = .77
(2, .84) because 21 wins and 4 losses for deaths=2 and 21/(21+4) = .84
(3, .74) ...
Problem: I want to display the winrates per deaths as outlined above, thanks