import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
%matplotlib inline
import plotly.offline as py
import plotly.graph_objects as go
py.init_notebook_mode(connected=True)
df = pd.read_csv("https://raw.githubusercontent.com/plotly/datasets/master/school_earnings.csv")
data = [go.Bar(x=df.School,
y=df.Gap)]
layout = go.Layout(dict(title = "Male and Female gap in schools",
xaxis = dict(title = 'Number of students'),
yaxis = dict(title = 'School Name'),
))
py.plot(dict(data=data, layout=layout), include_plotlyjs=False, output_type='div')
# py.iplot(dict(data=data, layout=layout),filename='Basic bar plot')