Closed
Description
I think this should raise as this is not clear how this should work (e.g. should you get all the other levels set to nan
?)
or see my comment below, maybe just document?
In [11]: s = pd.Series(np.arange(9),index=pd.MultiIndex.from_product([['A','B','C'],['foo','bar','baz']],names=['one','two'])).sortlevel()
In [12]: s
Out[12]:
one two
A bar 1
baz 2
foo 0
B bar 4
baz 5
foo 3
C bar 7
baz 8
foo 6
dtype: int64
In [13]: s.reindex(['A','B','D'],level=0)
Out[13]:
one two
A bar 1
baz 2
foo 0
B bar 4
baz 5
foo 3
dtype: int64