Kernel: Python 3 (Anaconda)
In [1]:
Timestamp | Temperature | Humidity | CO2 | Noise | Pressure | |
---|---|---|---|---|---|---|
Timezone : America/Los_Angeles | ||||||
2016-04-20 22:01:00 | 1461214860 | 22.8 | 57 | 399 | 35 | 1009.2 |
2016-04-20 22:31:00 | 1461216660 | 22.8 | 57 | 393 | 35 | 1009.2 |
2016-04-20 23:01:00 | 1461218460 | 22.8 | 57 | 392 | 35 | 1009.2 |
2016-04-20 23:31:00 | 1461220260 | 22.7 | 57 | 391 | 35 | 1009.1 |
2016-04-21 00:01:00 | 1461222060 | 22.7 | 57 | 384 | 35 | 1009.0 |
In [2]:
<matplotlib.axes._subplots.AxesSubplot at 0x7f6b97c3bc18>
In [3]:
<matplotlib.axes._subplots.AxesSubplot at 0x7f6ba0050860>
In [4]:
<matplotlib.axes._subplots.AxesSubplot at 0x7f6b97d115c0>
In [5]:
In [6]:
count 2888.000000
mean -0.055188
std 0.308958
min -12.083333
25% -0.036691
50% 0.000000
75% 0.000000
max 0.000000
dtype: float64
In [7]:
<matplotlib.axes._subplots.AxesSubplot at 0x7f6b97d11128>
In [8]:
<matplotlib.axes._subplots.AxesSubplot at 0x7f6b91a7e780>
In [9]:
Timestamp | Temperature | Humidity | CO2 | Noise | Pressure | |
---|---|---|---|---|---|---|
Timezone : America/Los_Angeles | ||||||
2016-04-19 12:31:00 | 1461094260 | 23.1 | 57 | 1665 | 36 | 1009.5 |
In [10]:
TypeErrorTraceback (most recent call last)
/projects/anaconda3/lib/python3.5/site-packages/pandas/indexes/base.py in get_value(self, series, key)
1916 try:
-> 1917 return tslib.get_value_box(s, key)
1918 except IndexError:
pandas/tslib.pyx in pandas.tslib.get_value_box (pandas/tslib.c:17748)()
pandas/tslib.pyx in pandas.tslib.get_value_box (pandas/tslib.c:17416)()
TypeError: 'str' object cannot be interpreted as an integer
During handling of the above exception, another exception occurred:
KeyErrorTraceback (most recent call last)
/projects/anaconda3/lib/python3.5/site-packages/pandas/tseries/index.py in get_value(self, series, key)
1375 try:
-> 1376 return _maybe_box(self, Index.get_value(self, series, key),
1377 series, key)
/projects/anaconda3/lib/python3.5/site-packages/pandas/indexes/base.py in get_value(self, series, key)
1924 else:
-> 1925 raise e1
1926 except Exception: # pragma: no cover
/projects/anaconda3/lib/python3.5/site-packages/pandas/indexes/base.py in get_value(self, series, key)
1910 return self._engine.get_value(s, k,
-> 1911 tz=getattr(series.dtype, 'tz', None))
1912 except KeyError as e1:
pandas/index.pyx in pandas.index.IndexEngine.get_value (pandas/index.c:3234)()
pandas/index.pyx in pandas.index.IndexEngine.get_value (pandas/index.c:2931)()
pandas/index.pyx in pandas.index.DatetimeEngine.get_loc (pandas/index.c:11025)()
pandas/index.pyx in pandas.index.DatetimeEngine._date_check_type (pandas/index.c:11193)()
KeyError: '2016-04-19 12:18:29'
During handling of the above exception, another exception occurred:
KeyErrorTraceback (most recent call last)
pandas/index.pyx in pandas.index.DatetimeEngine.get_loc (pandas/index.c:10814)()
pandas/hashtable.pyx in pandas.hashtable.Int64HashTable.get_item (pandas/hashtable.c:6527)()
pandas/hashtable.pyx in pandas.hashtable.Int64HashTable.get_item (pandas/hashtable.c:6465)()
KeyError: 1461068309000000000
During handling of the above exception, another exception occurred:
KeyErrorTraceback (most recent call last)
/projects/anaconda3/lib/python3.5/site-packages/pandas/tseries/index.py in get_value(self, series, key)
1385 try:
-> 1386 return self.get_value_maybe_box(series, key)
1387 except (TypeError, ValueError, KeyError):
/projects/anaconda3/lib/python3.5/site-packages/pandas/tseries/index.py in get_value_maybe_box(self, series, key)
1396 values = self._engine.get_value(_values_from_object(series),
-> 1397 key, tz=self.tz)
1398 return _maybe_box(self, values, series, key)
pandas/index.pyx in pandas.index.IndexEngine.get_value (pandas/index.c:3234)()
pandas/index.pyx in pandas.index.IndexEngine.get_value (pandas/index.c:2931)()
pandas/index.pyx in pandas.index.DatetimeEngine.get_loc (pandas/index.c:10880)()
KeyError: Timestamp('2016-04-19 12:18:29')
During handling of the above exception, another exception occurred:
KeyErrorTraceback (most recent call last)
<ipython-input-10-9bcbc0c0688d> in <module>()
1 time2 = '2016-04-19 12:18:29'
2 time1 = '2016-04-19 12:43:36'
----> 3 rise = data['CO2'][time2] - data['CO2'][time1]
4 run = (data['Timestamp'][time2] - data['Timestamp'][time1])
5
/projects/anaconda3/lib/python3.5/site-packages/pandas/core/series.py in __getitem__(self, key)
558 def __getitem__(self, key):
559 try:
--> 560 result = self.index.get_value(self, key)
561
562 if not lib.isscalar(result):
/projects/anaconda3/lib/python3.5/site-packages/pandas/tseries/index.py in get_value(self, series, key)
1386 return self.get_value_maybe_box(series, key)
1387 except (TypeError, ValueError, KeyError):
-> 1388 raise KeyError(key)
1389
1390 def get_value_maybe_box(self, series, key):
KeyError: '2016-04-19 12:18:29'
In [0]: