<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; import warnings
&gt;&gt;&gt; warnings.simplefilter('error')

&gt;&gt;&gt; import pandas as pd
&gt;&gt;&gt; pd.__version__
u'0.17.0rc1'

&gt;&gt;&gt; df = pd.DataFrame({'A': list('aabb'), 'B': [0, 1, 0, 1], 'C': range(4)})
&gt;&gt;&gt; gf = df.groupby(['A', 'B']).sum()
&gt;&gt;&gt; gf
     C
A B   
a 0  0
  1  1
b 0  2
  1  3

&gt;&gt;&gt; gf.unstack()
Traceback (most recent call last):
..., line 4274, in _reference_duplicate_name
    return np.sum(name == np.asarray(self.names)) &gt; 1
DeprecationWarning: elementwise == comparison failed; this will raise an error in the future."><pre class="notranslate"><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-k">import</span> <span class="pl-s1">warnings</span>
<span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">warnings</span>.<span class="pl-en">simplefilter</span>(<span class="pl-s">'error'</span>)

<span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-k">import</span> <span class="pl-s1">pandas</span> <span class="pl-k">as</span> <span class="pl-s1">pd</span>
<span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">pd</span>.<span class="pl-s1">__version__</span>
<span class="pl-s">u'0.17.0rc1'</span>

<span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">df</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">DataFrame</span>({<span class="pl-s">'A'</span>: <span class="pl-en">list</span>(<span class="pl-s">'aabb'</span>), <span class="pl-s">'B'</span>: [<span class="pl-c1">0</span>, <span class="pl-c1">1</span>, <span class="pl-c1">0</span>, <span class="pl-c1">1</span>], <span class="pl-s">'C'</span>: <span class="pl-en">range</span>(<span class="pl-c1">4</span>)})
<span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">gf</span> <span class="pl-c1">=</span> <span class="pl-s1">df</span>.<span class="pl-en">groupby</span>([<span class="pl-s">'A'</span>, <span class="pl-s">'B'</span>]).<span class="pl-en">sum</span>()
<span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">gf</span>
     <span class="pl-v">C</span>
<span class="pl-v">A</span> <span class="pl-v">B</span>   
<span class="pl-s1">a</span> <span class="pl-c1">0</span>  <span class="pl-c1">0</span>
  <span class="pl-c1">1</span>  <span class="pl-c1">1</span>
<span class="pl-s1">b</span> <span class="pl-c1">0</span>  <span class="pl-c1">2</span>
  <span class="pl-c1">1</span>  <span class="pl-c1">3</span>

<span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">gf</span>.<span class="pl-en">unstack</span>()
<span class="pl-v">Traceback</span> (<span class="pl-s1">most</span> <span class="pl-s1">recent</span> <span class="pl-s1">call</span> <span class="pl-s1">last</span>):
..., <span class="pl-s1">line</span> <span class="pl-c1">4274</span>, <span class="pl-s1">in</span> <span class="pl-s1">_reference_duplicate_name</span>
    <span class="pl-k">return</span> <span class="pl-s1">np</span>.<span class="pl-en">sum</span>(<span class="pl-s1">name</span> <span class="pl-c1">==</span> <span class="pl-s1">np</span>.<span class="pl-en">asarray</span>(<span class="pl-s1">self</span>.<span class="pl-s1">names</span>)) <span class="pl-c1">&gt;</span> <span class="pl-c1">1</span>
<span class="pl-v">DeprecationWarning</span>: <span class="pl-s1">elementwise</span> <span class="pl-c1">==</span> <span class="pl-s1">comparison</span> <span class="pl-s1">failed</span>; <span class="pl-s1">this</span> <span class="pl-s1">will</span> <span class="pl-k">raise</span> <span class="pl-s1">an</span> <span class="pl-s1">error</span> <span class="pl-c1">in</span> <span class="pl-s1">the</span> <span class="pl-s1">future</span>.</pre></div>
<p dir="auto"><a href="http://stackoverflow.com/questions/21318865/read-multi-index-on-the-columns-from-csv-file" rel="nofollow">http://stackoverflow.com/questions/21318865/read-multi-index-on-the-columns-from-csv-file</a></p>