pydata/pandas — pull request #4761 by jreback (2013-09-06 03:08:12+00:00)
Title: BUG: in multi-indexing with a partial string selection (GH4758)

closes #4758

```
In [2]: df = DataFrame({'ACCOUNT':["ACCT1", "ACCT1", "ACCT1", "ACCT2"],
...: 'TICKER':["ABC", "MNP", "XYZ", "XYZ"],
...: 'val':[1,2,3,4]},
...: index=date_range("2013-06-19 09:30:00", periods=4, freq='5T'))

In [3]: df_multi = df.set_index(['ACCOUNT', 'TICKER'], append=True)

In [4]: df_multi.loc[(pd.Timestamp('2013-06-19 09:30:00', tz=None), 'ACCT1', 'ABC')]
Out[4]:
val 1
Name: (2013-06-19 09:30:00, ACCT1, ABC), dtype: int64

In [5]: df_multi.loc[('2013-06-19 09:30:00', 'ACCT1', 'ABC')]
Out[5]:
val 1
Name: (2013-06-19 09:30:00, ACCT1, ABC), dtype: int64
```

This is quite difficult to do, a partial selection on a single indexer, so KeyError for now
```
In [6]: df_multi.loc[('2013-06-19', 'ACCT1', 'ABC')]
KeyError: 'the label [ACCT1] is not in the [columns]'

```