Code Sample, a copy-pastable example if possible
From #17295 (comment)
In [2]: pd.DataFrame([[i] for i in range(3)], index=pd.MultiIndex.from_product([[1], [5,6,7]])).loc[[(1,5), (3,7)]]
Out[2]:
0
1 5 0.0
3 7 NaN
Problem description
#17295 introduced a warning when obj.loc[a_list] is called with a_list containing keys not in obj.index, but only applies to flat Indexes. MultiIndexes need an analogous PR.
Expected Output
The same, but with a FutureWarning.
Activity
jreback commentedon Apr 14, 2018
@toobaz would you be able to push a PR for this?
API: emit warning to raise KeyError in the future for missing keys al…
API: emit warning to raise KeyError in the future for missing keys al…
API: emit warning to raise KeyError in the future for missing keys al…
Emit warning for missing labels in Multiindex.loc[[...]] (and more) (#…