This notebook demonstrates the Pandas DataFrame generated by a HoboReader instance.
from hoboreader import HoboReader
h=HoboReader('sample_hobo_data.csv')
df=h.get_dataframe()
df.head()
title | # | Date Time | Temp | Coupler Detached | Coupler Attached | Host Connected | Stopped | End Of File |
---|---|---|---|---|---|---|---|---|
timezone_str | NaN | GMT+01:00 | NaN | NaN | NaN | NaN | NaN | NaN |
units | NaN | NaN | °F | NaN | NaN | NaN | NaN | NaN |
logger_serial_number | NaN | NaN | 10469238 | 10469238 | 10469238 | 10469238 | 10469238 | 10469238 |
sensor_serial_number | NaN | NaN | 10469238 | NaN | NaN | NaN | NaN | NaN |
datetimes | ||||||||
2019-10-10 11:00:00+01:00 | 1 | 10/10/19 11:00:00 AM | 72.199 | NaN | NaN | NaN | NaN | NaN |
2019-10-10 11:00:02+01:00 | 2 | 10/10/19 11:00:02 AM | NaN | Logged | NaN | NaN | NaN | NaN |
2019-10-10 11:05:00+01:00 | 3 | 10/10/19 11:05:00 AM | 72.545 | NaN | NaN | NaN | NaN | NaN |
2019-10-10 11:10:00+01:00 | 4 | 10/10/19 11:10:00 AM | 72.372 | NaN | NaN | NaN | NaN | NaN |
2019-10-10 11:15:00+01:00 | 5 | 10/10/19 11:15:00 AM | 72.545 | NaN | NaN | NaN | NaN | NaN |
When the DataFrame is created, the following actions occur:
%matplotlib inline
df['Temp'].plot()
<matplotlib.axes._subplots.AxesSubplot at 0x163f911ec18>
df['Temp'].head()
timezone_str | NaN |
---|---|
units | °F |
logger_serial_number | 10469238 |
sensor_serial_number | 10469238 |
datetimes | |
2019-10-10 11:00:00+01:00 | 72.199 |
2019-10-10 11:00:02+01:00 | NaN |
2019-10-10 11:05:00+01:00 | 72.545 |
2019-10-10 11:10:00+01:00 | 72.372 |
2019-10-10 11:15:00+01:00 | 72.545 |
s=df['Temp'][df['Temp'].columns[0]]
s.head()
datetimes 2019-10-10 11:00:00+01:00 72.199 2019-10-10 11:00:02+01:00 NaN 2019-10-10 11:05:00+01:00 72.545 2019-10-10 11:10:00+01:00 72.372 2019-10-10 11:15:00+01:00 72.545 Name: (nan, °F, 10469238, 10469238), dtype: float64