Created
February 16, 2020 14:04
-
-
Save aravindpai/4cebc87d0371279101089782ddb4b570 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
score = batting_df.groupby(['year','match','innings_no']).apply(lambda x:x['runs'].sum()).reset_index(name='score') | |
print("Batting First Average score:",np.median(score[score['innings_no']==1]['score'].values)) | |
print("Batting Second Average score:",np.median(score[score['innings_no']==2]['score'].values)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment