Closed
Description
df = pandas.DataFrame([['a'], ['b']], index=[1,2], columns=['x'])
df.loc[[3]] # does not raise KeyError as documented
"ALL of the labels for which you ask, must be in the index or a KeyError will be raised!"
http://pandas.pydata.org/pandas-docs/stable/indexing.html#selection-by-label
and
".loc is strictly label based, will raise KeyError when the items are not found":
http://pandas.pydata.org/pandas-docs/stable/indexing.html#different-choices-for-indexing-loc-iloc-and-ix
also, possibly separate bug:
df.loc[pandas.Index(['a', 'k', 'b']), : ]
DOES fail, so we have an inconsistency between .loc[values,:] and .loc[values]