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)
[((105, 148), 'pandas.read_csv', 'pd.read_csv', (['"""Data/nst-est2017-alldata.csv"""'], {}), "('Data/nst-est2017-alldata.csv')\n", (116, 148), True, 'import pandas as pd\n'), ((457, 471), 'plotly.offline.plot', 'pyo.plot', (['data'], {}), '(data)\n', (465, 471), True, 'import plotly.offline as pyo\n'), ((317, 384), 'plotly.graph_objs.Scatter', 'go.Scatter', ([], {'x': 'df2.columns', 'y': 'df2.loc[name]', 'mode': '"""lines"""', 'name': 'name'}), "(x=df2.columns, y=df2.loc[name], mode='lines', name=name)\n", (327, 384), True, 'import plotly.graph_objs as go\n')]