In [1]:
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline

In [2]:
datos = pd.read_csv('reporte_instantaneo.csv', sep=';', index_col=1, parse_dates=True, decimal='.', na_values=['-', None])

In [3]:
datos.info()
datos.columns


<class 'pandas.core.frame.DataFrame'>
DatetimeIndex: 168 entries, 2015-03-20 00:00:00 to 2015-03-26 23:00:00
Data columns (total 5 columns):
Nro.                               168 non-null int64
Rio Copiapo en -AltLM (m)          156 non-null float64
Rio Copiapo en -Caudal (m3/seg)    156 non-null float64
Copiapo -PpAcu (mm)                133 non-null float64
Copiapo -Pp1Hra (mm)               126 non-null float64
dtypes: float64(4), int64(1)
memory usage: 7.9 KB
Out[3]:
Index([u'Nro.', u'Rio Copiapo en -AltLM (m)', u'Rio Copiapo en -Caudal (m3/seg)', u'Copiapo -PpAcu (mm)', u'Copiapo -Pp1Hra (mm)'], dtype='object')

In [4]:
datos.head()


Out[4]:
Nro. Rio Copiapo en -AltLM (m) Rio Copiapo en -Caudal (m3/seg) Copiapo -PpAcu (mm) Copiapo -Pp1Hra (mm)
Fecha-Hora de Medicion
2015-03-20 00:00:00 1 0.35 1.112 0 0
2015-03-20 01:00:00 2 0.35 1.112 0 0
2015-03-20 02:00:00 3 0.39 1.316 0 0
2015-03-20 03:00:00 4 0.42 1.493 0 0
2015-03-20 04:00:00 5 0.43 1.555 0 0

In [5]:
datos.drop(u'Nro.', axis=1, inplace=True)

In [6]:
datos.plot(figsize=(10, 10), subplots=True, sharex=True)


Out[6]:
array([<matplotlib.axes._subplots.AxesSubplot object at 0x096628D0>,
       <matplotlib.axes._subplots.AxesSubplot object at 0x097834B0>,
       <matplotlib.axes._subplots.AxesSubplot object at 0x097EA8B0>,
       <matplotlib.axes._subplots.AxesSubplot object at 0x0981D0B0>], dtype=object)

In [7]:
cols = [col for col in datos.columns if col not in ['Rio Copiapo en -AltLM (m)']]
ax = datos[cols].plot(figsize=(10, 10), secondary_y=[u'Copiapo -PpAcu (mm)', 'Copiapo -Pp1Hra (mm)'])
ax.set_ylabel('(m3/s)')
ax.right_ax.set_ylabel('(mm)')


Out[7]:
<matplotlib.text.Text at 0x9c0aaf0>

In [ ]:


In [ ]: