Skip to content

Instantly share code, notes, and snippets.

@amankharwal
Created December 23, 2020 14:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amankharwal/48e6aa7441e1962c6700323944b1031e to your computer and use it in GitHub Desktop.
Save amankharwal/48e6aa7441e1962c6700323944b1031e to your computer and use it in GitHub Desktop.
venue_matches=matches.groupby('venue').count()[['id']].sort_values(by='id',ascending=False).head()
ser = pd.Series(venue_matches['id'])
venue_matches=matches.groupby('venue').count()[['id']].reset_index()
data = [{"y": venue_matches['id'],"x": venue_matches['venue'],
"marker": {"color": "lightblue", "size": 12},
"line": {"color": "red","width" : 2,"dash" : 'dash'},
"mode": "markers+lines", "name": "Women", "type": "scatter"}]
layout = {"title": "Stadiums Vs. Matches",
"xaxis": {"title": "Matches Played", },
"yaxis": {"title": "Stadiums"},
"autosize":False,"width":900,"height":700,"plot_bgcolor":"rgb(245,245,245)"}
fig = go.Figure(data=data, layout=layout)
iplot(fig)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment