Skip to content

Instantly share code, notes, and snippets.



Created Feb 16, 2020
What would you like to do?
df1 = grp.groupby('bowling_team').apply(lambda x:x.shape[0]).reset_index(name='no')
df2=grp.groupby('bowling_team').apply(lambda x: x[x['innings_no']==x['result']].shape[0]).reset_index(name='won')
df2['Win %']=df2['won']/df1['no']"bowling_team", y="Win %", rot=0, title="Win % against different teams",figsize=(10,8)).get_figure() #weighted
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment