import pandas as pd
import numpy as np
import plotly.offline as pyo
import plotly.graph_objs as go


df= pd.read_csv("Data/nst-est2017-alldata.csv")
df2=df[df["DIVISION"] == '1']
df2.set_index("NAME",inplace=True)

list_of_pop_col=[col for col in df2.columns if col.startswith('POP')]
df2=df2[list_of_pop_col]

data=[go.Scatter(x=df2.columns,
                y=df2.loc[name],
                mode='lines',
                name=name) for name in df2.index]

pyo.plot(data)
[(7, 'pandas.read_csv', 'pd.read_csv', True, 'import pandas as pd\n'), (19, 'plotly.offline.plot', 'pyo.plot', True, 'import plotly.offline as pyo\n'), (14, 'plotly.graph_objs.Scatter', 'go.Scatter', True, 'import plotly.graph_objs as go\n')]