Python - Read and plot data from a .csv -


i have .csv full of gdp data year different countries. want read file , plot data of select few of countries in .csv file. far have:

data = np.genfromtxt('the_data.csv', dtype=str, delimiter=',', names=none, usecols=np.arange(0,17)) 

which think lets me read data. how use matplotlib generate graph of gdp change on years, of countries?

with open(the_data.csv) f:     content = f.readlines()     my_list=[]     line in content:                  my_list.add(line.split(';') ) 

or use csv module https://docs.python.org/2/library/csv.html


Comments

Popular posts from this blog

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

c++ - OpenMP unpredictable overhead -

javascript - Wordpress slider, not displayed 100% width -