Skip to content

Instantly share code, notes, and snippets.

@amankharwal
Created Dec 23, 2020
Embed
What would you like to do?
high_scores=deliveries.groupby(['id', 'inning','batting_team','bowling_team'])['total_runs'].sum().reset_index()
high_scores=high_scores[high_scores['total_runs']>=200]
hss = high_scores.nlargest(10,'total_runs')
trace = go.Table(
header=dict(values=["Inning","Batting Team","Bowling Team", "Total Runs"],
fill = dict(color = 'red'),
font = dict(color = 'white', size = 14),
align = ['center'],
height = 30),
cells=dict(values=[hss['inning'], hss['batting_team'], hss['bowling_team'], hss['total_runs']],
fill = dict(color = ['lightsalmon', 'rgb(245, 245, 249)']),
align = ['center'], font_size=13))
layout = dict(
width=830,
height=410,
autosize=False,
title='Highest scores of IPL',
showlegend=False,
)
fig1 = dict(data=[trace], layout=layout)
iplot(fig1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment