<p dir="auto">Using the example from the docs here: <a href="http://pandas.pydata.org/pandas-docs/dev/io.html#storing-multi-index-dataframes" rel="nofollow">http://pandas.pydata.org/pandas-docs/dev/io.html#storing-multi-index-dataframes</a> but specifying the 'columns' in <code class="notranslate">[1219]</code> keyword when selecting:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="store.select('df_mi', columns=['A', 'B'])"><pre class="notranslate"><code class="notranslate">store.select('df_mi', columns=['A', 'B'])
</code></pre></div>
<p dir="auto">leads to the failure below. The original example works, as does selecting columns with a standard index. I'm on a fairly recent master (~1 week) and Python 3.3. Hope this is not expected and I did not miss an issue, I did search for a bit.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="KeyError                                  Traceback (most recent call last)
&lt;ipython-input-67-678a9c77d998&gt; in &lt;module&gt;()
----&gt; 1 store.select('df_mi', columns=['A', 'B'])

/home/xxx/anaconda/envs/py33/lib/python3.3/site-packages/pandas-0.12.0.dev_2bd1cf8-py3.3-linux-x86_64.egg/pandas/io/pytables.py in select(self, key, where, start, stop, columns, iterator, chunksize, **kwargs)
    413             return TableIterator(func, nrows=s.nrows, start=start, stop=stop, chunksize=chunksize)
    414 
--&gt; 415         return TableIterator(func, nrows=s.nrows, start=start, stop=stop).get_values()
    416 
    417     def select_as_coordinates(self, key, where=None, start=None, stop=None, **kwargs):

/home/xxx/anaconda/envs/py33/lib/python3.3/site-packages/pandas-0.12.0.dev_2bd1cf8-py3.3-linux-x86_64.egg/pandas/io/pytables.py in get_values(self)
    931 
    932     def get_values(self):
--&gt; 933         return self.func(self.start, self.stop)
    934 
    935 

/home/xxx/anaconda/envs/py33/lib/python3.3/site-packages/pandas-0.12.0.dev_2bd1cf8-py3.3-linux-x86_64.egg/pandas/io/pytables.py in func(_start, _stop)
    408         # what we are actually going to do for a chunk
    409         def func(_start, _stop):
--&gt; 410             return s.read(where=where, start=_start, stop=_stop, columns=columns, **kwargs)
    411 
    412         if iterator or chunksize is not None:

/home/xxx/anaconda/envs/py33/lib/python3.3/site-packages/pandas-0.12.0.dev_2bd1cf8-py3.3-linux-x86_64.egg/pandas/io/pytables.py in read(self, *args, **kwargs)
   3142     def read(self, *args, **kwargs):
   3143         df = super(AppendableMultiFrameTable, self).read(*args, **kwargs)
-&gt; 3144         df.set_index(self.levels, inplace=True)
   3145         return df
   3146 

/home/xxx/anaconda/envs/py33/lib/python3.3/site-packages/pandas-0.12.0.dev_2bd1cf8-py3.3-linux-x86_64.egg/pandas/core/frame.py in set_index(self, keys, drop, append, inplace, verify_integrity)
   2795                 names.append(None)
   2796             else:
-&gt; 2797                 level = frame[col].values
   2798                 names.append(col)
   2799                 if drop:

/home/xxx/anaconda/envs/py33/lib/python3.3/site-packages/pandas-0.12.0.dev_2bd1cf8-py3.3-linux-x86_64.egg/pandas/core/frame.py in __getitem__(self, key)
   1992         else:
   1993             # get column
-&gt; 1994             return self._get_item_cache(key)
   1995 
   1996     def _getitem_slice(self, key):

/home/xxx/anaconda/envs/py33/lib/python3.3/site-packages/pandas-0.12.0.dev_2bd1cf8-py3.3-linux-x86_64.egg/pandas/core/generic.py in _get_item_cache(self, item)
    572             return cache[item]
    573         except Exception:
--&gt; 574             values = self._data.get(item)
    575             res = self._box_item_values(item, values)
    576             cache[item] = res

/home/xxx/anaconda/envs/py33/lib/python3.3/site-packages/pandas-0.12.0.dev_2bd1cf8-py3.3-linux-x86_64.egg/pandas/core/internals.py in get(self, item)
   1646 
   1647     def get(self, item):
-&gt; 1648         _, block = self._find_block(item)
   1649         return block.get(item)
   1650 

/home/xxx/anaconda/envs/py33/lib/python3.3/site-packages/pandas-0.12.0.dev_2bd1cf8-py3.3-linux-x86_64.egg/pandas/core/internals.py in _find_block(self, item)
   1773 
   1774     def _find_block(self, item):
-&gt; 1775         self._check_have(item)
   1776         for i, block in enumerate(self.blocks):
   1777             if item in block:

/home/xxx/anaconda/envs/py33/lib/python3.3/site-packages/pandas-0.12.0.dev_2bd1cf8-py3.3-linux-x86_64.egg/pandas/core/internals.py in _check_have(self, item)
   1780     def _check_have(self, item):
   1781         if item not in self.items:
-&gt; 1782             raise KeyError('no item named %s' % com.pprint_thing(item))
   1783 
   1784     def reindex_axis(self, new_axis, method=None, axis=0, copy=True):

KeyError: 'no item named foo'"><pre class="notranslate"><code class="notranslate">KeyError                                  Traceback (most recent call last)
&lt;ipython-input-67-678a9c77d998&gt; in &lt;module&gt;()
----&gt; 1 store.select('df_mi', columns=['A', 'B'])

/home/xxx/anaconda/envs/py33/lib/python3.3/site-packages/pandas-0.12.0.dev_2bd1cf8-py3.3-linux-x86_64.egg/pandas/io/pytables.py in select(self, key, where, start, stop, columns, iterator, chunksize, **kwargs)
    413             return TableIterator(func, nrows=s.nrows, start=start, stop=stop, chunksize=chunksize)
    414 
--&gt; 415         return TableIterator(func, nrows=s.nrows, start=start, stop=stop).get_values()
    416 
    417     def select_as_coordinates(self, key, where=None, start=None, stop=None, **kwargs):

/home/xxx/anaconda/envs/py33/lib/python3.3/site-packages/pandas-0.12.0.dev_2bd1cf8-py3.3-linux-x86_64.egg/pandas/io/pytables.py in get_values(self)
    931 
    932     def get_values(self):
--&gt; 933         return self.func(self.start, self.stop)
    934 
    935 

/home/xxx/anaconda/envs/py33/lib/python3.3/site-packages/pandas-0.12.0.dev_2bd1cf8-py3.3-linux-x86_64.egg/pandas/io/pytables.py in func(_start, _stop)
    408         # what we are actually going to do for a chunk
    409         def func(_start, _stop):
--&gt; 410             return s.read(where=where, start=_start, stop=_stop, columns=columns, **kwargs)
    411 
    412         if iterator or chunksize is not None:

/home/xxx/anaconda/envs/py33/lib/python3.3/site-packages/pandas-0.12.0.dev_2bd1cf8-py3.3-linux-x86_64.egg/pandas/io/pytables.py in read(self, *args, **kwargs)
   3142     def read(self, *args, **kwargs):
   3143         df = super(AppendableMultiFrameTable, self).read(*args, **kwargs)
-&gt; 3144         df.set_index(self.levels, inplace=True)
   3145         return df
   3146 

/home/xxx/anaconda/envs/py33/lib/python3.3/site-packages/pandas-0.12.0.dev_2bd1cf8-py3.3-linux-x86_64.egg/pandas/core/frame.py in set_index(self, keys, drop, append, inplace, verify_integrity)
   2795                 names.append(None)
   2796             else:
-&gt; 2797                 level = frame[col].values
   2798                 names.append(col)
   2799                 if drop:

/home/xxx/anaconda/envs/py33/lib/python3.3/site-packages/pandas-0.12.0.dev_2bd1cf8-py3.3-linux-x86_64.egg/pandas/core/frame.py in __getitem__(self, key)
   1992         else:
   1993             # get column
-&gt; 1994             return self._get_item_cache(key)
   1995 
   1996     def _getitem_slice(self, key):

/home/xxx/anaconda/envs/py33/lib/python3.3/site-packages/pandas-0.12.0.dev_2bd1cf8-py3.3-linux-x86_64.egg/pandas/core/generic.py in _get_item_cache(self, item)
    572             return cache[item]
    573         except Exception:
--&gt; 574             values = self._data.get(item)
    575             res = self._box_item_values(item, values)
    576             cache[item] = res

/home/xxx/anaconda/envs/py33/lib/python3.3/site-packages/pandas-0.12.0.dev_2bd1cf8-py3.3-linux-x86_64.egg/pandas/core/internals.py in get(self, item)
   1646 
   1647     def get(self, item):
-&gt; 1648         _, block = self._find_block(item)
   1649         return block.get(item)
   1650 

/home/xxx/anaconda/envs/py33/lib/python3.3/site-packages/pandas-0.12.0.dev_2bd1cf8-py3.3-linux-x86_64.egg/pandas/core/internals.py in _find_block(self, item)
   1773 
   1774     def _find_block(self, item):
-&gt; 1775         self._check_have(item)
   1776         for i, block in enumerate(self.blocks):
   1777             if item in block:

/home/xxx/anaconda/envs/py33/lib/python3.3/site-packages/pandas-0.12.0.dev_2bd1cf8-py3.3-linux-x86_64.egg/pandas/core/internals.py in _check_have(self, item)
   1780     def _check_have(self, item):
   1781         if item not in self.items:
-&gt; 1782             raise KeyError('no item named %s' % com.pprint_thing(item))
   1783 
   1784     def reindex_axis(self, new_axis, method=None, axis=0, copy=True):

KeyError: 'no item named foo'
</code></pre></div>
<p dir="auto">I'm using pandas 0.12.0 and having issue with accessing hierarchically indexed data frame elements using the ix. As a note, the issue is coming only when I have datetime objects in level 0 of hierarchical index.</p>
<p dir="auto">arrays = [date_range('2013-11-15', periods=4).repeat(2),<br>
['one', 'two', 'one', 'two', 'one', 'two', 'one', 'two']]<br>
tuples = list(zip(*arrays))<br>
index = MultiIndex.from_tuples(tuples, names=['first', 'second'])<br>
df = DataFrame(randn(8, 3), index=index, columns=['A', 'B', 'C'])<br>
df.ix['2013-11-15', 'one']</p>
<hr>
<p dir="auto">KeyError                                  Traceback (most recent call last)<br>
 in ()<br>
----&gt; 1 df.ix['2013-11-15', 'one']</p>
<p dir="auto">~/env/lib/python2.6/site-packages/pandas/core/indexing.pyc in <strong>getitem</strong>(self, key)<br>
45                 pass<br>
46<br>
---&gt; 47             return self._getitem_tuple(key)<br>
48         else:<br>
49             return self._getitem_axis(key, axis=0)</p>
<p dir="auto">~/env/lib/python2.6/site-packages/pandas/core/indexing.pyc in _getitem_tuple(self, tup)<br>
251     def _getitem_tuple(self, tup):<br>
252         try:<br>
--&gt; 253             return self._getitem_lowerdim(tup)<br>
254         except IndexingError:<br>
255             pass</p>
<p dir="auto">~/env/lib/python2.6/site-packages/pandas/core/indexing.pyc in _getitem_lowerdim(self, tup)<br>
384                         new_key, = new_key<br>
385<br>
--&gt; 386                 return getattr(section,self.name)[new_key]<br>
387<br>
388         raise IndexingError('not applicable')</p>
<p dir="auto">~/env/lib/python2.6/site-packages/pandas/core/indexing.pyc in <strong>getitem</strong>(self, key)<br>
45                 pass<br>
46<br>
---&gt; 47             return self._getitem_tuple(key)<br>
48         else:<br>
49             return self._getitem_axis(key, axis=0)</p>
<p dir="auto">~/env/lib/python2.6/site-packages/pandas/core/indexing.pyc in _getitem_tuple(self, tup)<br>
251     def _getitem_tuple(self, tup):<br>
252         try:<br>
--&gt; 253             return self._getitem_lowerdim(tup)<br>
254         except IndexingError:<br>
255             pass</p>
<p dir="auto">~/env/lib/python2.6/site-packages/pandas/core/indexing.pyc in _getitem_lowerdim(self, tup)<br>
361         for i, key in enumerate(tup):<br>
362             if _is_label_like(key) or isinstance(key, tuple):<br>
--&gt; 363                 section = self._getitem_axis(key, axis=i)<br>
364<br>
365                 # we have yielded a scalar ?</p>
<p dir="auto">~/env/lib/python2.6/site-packages/pandas/core/indexing.pyc in _getitem_axis(self, key, axis)<br>
411                     return self._get_loc(key, axis=axis)<br>
412<br>
--&gt; 413             return self._get_label(key, axis=axis)<br>
414<br>
415     def _getitem_iterable(self, key, axis=0):</p>
<p dir="auto">~/env/lib/python2.6/site-packages/pandas/core/indexing.pyc in _get_label(self, label, axis)<br>
59             return self.obj._xs(label, axis=axis, copy=False)<br>
60         except Exception:<br>
---&gt; 61             return self.obj._xs(label, axis=axis, copy=True)<br>
62<br>
63     def _get_loc(self, key, axis=0):</p>
<p dir="auto">~/env/lib/python2.6/site-packages/pandas/core/frame.pyc in xs(self, key, axis, level, copy)<br>
2358<br>
2359         if axis == 1:<br>
-&gt; 2360             data = self[key]<br>
2361             if copy:<br>
2362                 data = data.copy()</p>
<p dir="auto">/u/pullurur/dig/quantinvest/env/lib/python2.6/site-packages/pandas/core/frame.pyc in <strong>getitem</strong>(self, key)<br>
2001             # get column<br>
2002             if self.columns.is_unique:<br>
-&gt; 2003                 return self._get_item_cache(key)<br>
2004<br>
2005             # duplicate columns</p>
<p dir="auto">~/env/lib/python2.6/site-packages/pandas/core/generic.pyc in _get_item_cache(self, item)<br>
665             return cache[item]<br>
666         except Exception:<br>
--&gt; 667             values = self._data.get(item)<br>
668             res = self._box_item_values(item, values)<br>
669             cache[item] = res</p>
<p dir="auto">~/env/lib/python2.6/site-packages/pandas/core/internals.pyc in get(self, item)<br>
1653     def get(self, item):<br>
1654         if self.items.is_unique:<br>
-&gt; 1655             _, block = self._find_block(item)<br>
1656             return block.get(item)<br>
1657         else:</p>
<p dir="auto">~/env/lib/python2.6/site-packages/pandas/core/internals.pyc in _find_block(self, item)<br>
1933<br>
1934     def _find_block(self, item):<br>
-&gt; 1935         self._check_have(item)<br>
1936         for i, block in enumerate(self.blocks):<br>
1937             if item in block:</p>
<p dir="auto">~/env/lib/python2.6/site-packages/pandas/core/internals.pyc in _check_have(self, item)<br>
1940     def _check_have(self, item):<br>
1941         if item not in self.items:<br>
-&gt; 1942             raise KeyError('no item named %s' % com.pprint_thing(item))<br>
1943<br>
1944     def reindex_axis(self, new_axis, method=None, axis=0, copy=True):</p>
<p dir="auto">KeyError: u'no item named one'</p>