BUG: validate multi index names in HDFStore writing · Issue #5527 · pandas-dev/pandas (original) (raw)

store_id_map.select('identifier_map')

KeyError Traceback (most recent call last)
in ()
----> 1 store_id_map.select('identifier_map')

C:\Python27\lib\site-packages\pandas\io\pytables.pyc in select(self, key, where, start, stop, columns, iterator, chunksize, auto_close, *_kwargs)
456 return TableIterator(self, func, nrows=s.nrows, start=start, stop=stop, chunksize=chunksize, auto_close=auto_close)
457
--> 458 return TableIterator(self, func, nrows=s.nrows, start=start, stop=stop, auto_close=auto_close).get_values()
459
460 def select_as_coordinates(self, key, where=None, start=None, stop=None, *_kwargs):

C:\Python27\lib\site-packages\pandas\io\pytables.pyc in get_values(self)
982
983 def get_values(self):
--> 984 results = self.func(self.start, self.stop)
985 self.close()
986 return results

C:\Python27\lib\site-packages\pandas\io\pytables.pyc in func(_start, _stop)
449 # what we are actually going to do for a chunk
450 def func(_start, _stop):
--> 451 return s.read(where=where, start=_start, stop=_stop, columns=columns, **kwargs)
452
453 if iterator or chunksize is not None:

C:\Python27\lib\site-packages\pandas\io\pytables.pyc in read(self, columns, *_kwargs)
3259 columns.insert(0, n)
3260 df = super(AppendableMultiFrameTable, self).read(columns=columns, *_kwargs)
-> 3261 df.set_index(self.levels, inplace=True)
3262 return df
3263

C:\Python27\lib\site-packages\pandas\core\frame.pyc in set_index(self, keys, drop, append, inplace, verify_integrity)
2827 names.append(None)
2828 else:
-> 2829 level = frame[col].values
2830 names.append(col)
2831 if drop:

C:\Python27\lib\site-packages\pandas\core\frame.pyc in getitem(self, key)
2001 # get column
2002 if self.columns.is_unique:
-> 2003 return self._get_item_cache(key)
2004
2005 # duplicate columns

C:\Python27\lib\site-packages\pandas\core\generic.pyc in _get_item_cache(self, item)
665 return cache[item]
666 except Exception:
--> 667 values = self._data.get(item)
668 res = self._box_item_values(item, values)
669 cache[item] = res

C:\Python27\lib\site-packages\pandas\core\internals.pyc in get(self, item)
1653 def get(self, item):
1654 if self.items.is_unique:
-> 1655 _, block = self._find_block(item)
1656 return block.get(item)
1657 else:

C:\Python27\lib\site-packages\pandas\core\internals.pyc in _find_block(self, item)
1933
1934 def _find_block(self, item):
-> 1935 self._check_have(item)
1936 for i, block in enumerate(self.blocks):
1937 if item in block:

C:\Python27\lib\site-packages\pandas\core\internals.pyc in _check_have(self, item)
1940 def _check_have(self, item):
1941 if item not in self.items:
-> 1942 raise KeyError('no item named %s' % com.pprint_thing(item))
1943
1944 def reindex_axis(self, new_axis, method=None, axis=0, copy=True):

KeyError: u'no item named None'

I am at a loss. What does that mean? I successfully saved the DataFrame but I cannot read it back.