Closed
Description
from #10468
In [40]: df = DataFrame({'A' : [1,2,3]},index=pd.MultiIndex.from_tuples([(1,np.nan),(1,1),(2,1)],names=['first','second']))
In [41]: df
Out[41]:
A
first second
1 NaN 1
1 2
2 1 3
In [42]: df.groupby(level='second').sum()
Out[42]:
A
second
1 5
In [43]: df.groupby(level=['first','second']).sum()
Out[43]:
A
first second
1 1 2
2 1 3
I suppose that [43] is missing the (1,nan)
group here.