%matplotlib inline import pandas as pd import seaborn as sns sns.set(context="poster", style="dark") import mpld3 import pylab as pl # csv location = https://github.com/aflyax/Python/blob/master/income/income_2013_dollars.csv income_df = pd.read_csv("income_2013_dollars.csv", sep='\t', thousands=',') income_df.columns = ["year", "lowest fifth", "second fifth", "third fifth", "fourth fifth", "top fifth", "top 5%"] income_df.sort(columns="year", inplace=True) income_df.head() income_df.tail() ax = income_df.plot(x="year") ax.set_ylabel("income") ax.set_xlabel("year") print("feel free to interact with the graph:") fig = pl.gcf() mpld3.display() mpld3.save_html(fig, "fig.html") income_df[income_df.year.isin([1970, 2000, 2013])]