[Matplotlib-users] read file with date and plot it

diedro diego.avesani at gmail.com
Sun Jul 15 11:30:21 EDT 2018


Dear all,

I have created with fortran the following file:

/
 2013:01:02-01,-999.0000, 1.0000000E+00,1.0000000E+00
 2013:01:02-02,-999.0000, 2.0000000E+00,0.0000000E+00
 2013:01:02-03,-999.0000, 3.0000000E+00,2.0000000E+00
 2013:01:02-04,-999.0000, 4.0000000E+00,0.0000000E+00
 2013:01:02-05,-999.0000, 5.0000000E+00,3.0000000E+00/
 ....

I would like to read it and to plot data according to date

so far this is what I do:

/folder = 'meteo_stations'
fname = 'stations_pp.txt'
headers = ['date','dato1','dato2','dato3']
df = pd.read_csv('./'+folder+'/'+fname,)

df.plot(x='date',y='dato2',)/

unfortunately, I get an error?

what shall I do?

Thanks for any kind of helps,

Best regards 








--
Sent from: http://matplotlib.1069221.n5.nabble.com/matplotlib-users-f3.html


More information about the Matplotlib-users mailing list