Skip to content

Instantly share code, notes, and snippets.

@amankharwal
Created Dec 23, 2020
Embed
What would you like to do?
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