对于多级index对象,groupby可以指定group的index层级: ... In [44]: grouped = s.groupby(level=0) In [45]: grouped.sum() Out[45]: first bar ...
確定! 回上一頁