Created
February 16, 2020 18:00
-
-
Save aravindpai/c987f18ac5de125a00cbb740e565894c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grp = batting_df.groupby('match').first().reset_index() | |
matches_won = grp[grp['innings_no'] == grp['result']] | |
print("Over all Winning %:",(matches_won.shape[0]/num)*100) | |
#Batting first & second | |
first = grp[grp['innings_no'] == 1] | |
second = grp[grp['innings_no'] == 2] | |
#Batting first winning % | |
won1 = first[first['innings_no'] == first['result']] | |
print("Batting First Winning % :",(won1.shape[0]/first.shape[0])*100) | |
#Batting secong winning % | |
won2 = second[second['innings_no'] == second['result']] | |
print("Batting Second Winning % :",(won2.shape[0]/second.shape[0])*100) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment