擅长:python、mysql、java
<p>根据这篇文章,<a href="https://stackoverflow.com/questions/19798229/python-pandas-how-to-do-group-by-on-a-multiindex">Python Pandas - how to do group by on a multiindex</a>,对多索引的分组应该是这样的</p>
<pre><code>dataGB = data['N'].groupby(level=[0,2])
</code></pre>