You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/Users/chen/Virtualenvs/python3Env/lib/python3.3/site-packages/pandas/core/internals.py in _find_block(self, item)
1524
1525 def _find_block(self, item):
-> 1526 self._check_have(item)
1527 for i, block in enumerate(self.blocks):
1528 if item in block:
/Users/chen/Virtualenvs/python3Env/lib/python3.3/site-packages/pandas/core/internals.py in _check_have(self, item)
1531 def _check_have(self, item):
1532 if item not in self.items:
-> 1533 raise KeyError('no item named %s' % com.pprint_thing(item))
1534
1535 def reindex_axis(self, new_axis, method=None, axis=0, copy=True):
KeyError: 'no item named 2012-01-02 18:01:00-06:00'
The text was updated successfully, but these errors were encountered:
Hello,
I am new to pandas and thanks for this great library!
I have a data frame like this:
I am trying to access the first element of this dataframe. If I use loc function, everything works out:
But if I do something like this, an error is thrown. Is this expected?
KeyError Traceback (most recent call last)
in ()
----> 1 Gold_2012[Gold_2012.index[0]]
/Users/chen/Virtualenvs/python3Env/lib/python3.3/site-packages/pandas/core/frame.py in getitem(self, key)
1926 else:
1927 # get column
-> 1928 return self._get_item_cache(key)
1929
1930 def _getitem_slice(self, key):
/Users/chen/Virtualenvs/python3Env/lib/python3.3/site-packages/pandas/core/generic.py in _get_item_cache(self, item)
568 return cache[item]
569 except Exception:
--> 570 values = self._data.get(item)
571 res = self._box_item_values(item, values)
572 cache[item] = res
/Users/chen/Virtualenvs/python3Env/lib/python3.3/site-packages/pandas/core/internals.py in get(self, item)
1382
1383 def get(self, item):
-> 1384 _, block = self._find_block(item)
1385 return block.get(item)
1386
/Users/chen/Virtualenvs/python3Env/lib/python3.3/site-packages/pandas/core/internals.py in _find_block(self, item)
1524
1525 def _find_block(self, item):
-> 1526 self._check_have(item)
1527 for i, block in enumerate(self.blocks):
1528 if item in block:
/Users/chen/Virtualenvs/python3Env/lib/python3.3/site-packages/pandas/core/internals.py in _check_have(self, item)
1531 def _check_have(self, item):
1532 if item not in self.items:
-> 1533 raise KeyError('no item named %s' % com.pprint_thing(item))
1534
1535 def reindex_axis(self, new_axis, method=None, axis=0, copy=True):
KeyError: 'no item named 2012-01-02 18:01:00-06:00'
The text was updated successfully, but these errors were encountered: