text_html_output_1.png
import pandas as pd

import plotly.express as px

import plotly.graph_objs as go

data = pd.read_csv('../input/basketball-players-stats-per-season-49-leagues/players_stats_by_season_full_details.csv')

data.shape

values = data['League'].value_counts().tolist()
names = list(dict(data['League'].value_counts()).keys())
fig = go.Bar(x=names, y=values, marker=dict(color='rgba(238, 103, 48, 0.85)', line=dict(color='rgb(25, 20, 20)', width=1.0)))
layout = go.Layout()
fig = go.Figure(data=fig, layout=layout)
fig.update_layout(title_text='Basketball Leagues')

values = data['Stage'].value_counts().tolist()
names = list(dict(data['Stage'].value_counts()).keys())

values = data['Season'].value_counts().tolist()
names = list(dict(data['Season'].value_counts()).keys())
fig = go.Bar(x=names, y=values, marker=dict(color='rgba(29, 66, 138, 0.75)', line=dict(color='rgb(25, 20, 20)', width=1.25)))
layout = go.Layout()
fig = go.Figure(data=fig, layout=layout)
fig.update_layout(title_text='Basketball Seasons')

values = data['Team'].value_counts().tolist()[:10]
names = list(dict(data['Team'].value_counts()).keys())[:10]
fig = go.Bar(x=names, y=values, marker=dict(color='rgba(85, 37, 130, 0.85)', line=dict(color='rgb(253, 185, 39)', width=1.25)))
layout = go.Layout()
fig = go.Figure(data=fig, layout=layout)
fig.update_layout(title_text='Top-10 Teams')

values = data['Player'].value_counts().tolist()[:10]
names = list(dict(data['Player'].value_counts()).keys())[:10]
fig = go.Bar(x=names, y=values, marker=dict(color='rgba(206, 17, 65, 0.85)', line=dict(color='rgb(6, 25, 34)', width=1.25)))
layout = go.Layout()
fig = go.Figure(data=fig, layout=layout)
fig.update_layout(title_text='Top-10 Players')
fig.show()