 <p>You can first remove <code>[]</code> from parameters in <a href="http://pandas.pydata.org/pandas-docs/stable/generated/pandas.pivot_table.html" rel="nofollow"><code>pivot_table</code></a>, so you remove <code>Multiindex</code> from columns:</p> <pre><code>pivot = pd.pivot_table(rows,index="A", values="C", columns="B",fill_value=0) </code></pre> <p>Then <a href="http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.sum.html" rel="nofollow"><code>sum</code></a> values by columns:</p> <pre><code>pivot['C'] = pivot.sum(axis=1) print (pivot) B x y C A a 1 2 3 b 0 4 4 </code></pre> <p>Cast by <a href="http://pandas.pydata.org/pandas-docs/stable/generated/pandas.Series.astype.html" rel="nofollow"><code>astype</code></a> <code>int</code> columns <code>x</code> and <code>y</code> to <code>str</code> and output to <code>D</code>:</p> <pre><code>pivot['D'] = pivot['x'].astype(str) + '+' + pivot['y'].astype(str) print (pivot) B x y C D A a 1 2 3 1+2 b 0 4 4 0+4 </code></pre> <p>Last remove column name by <a href="http://pandas.pydata.org/pandas-docs/stable/whatsnew.html#changes-to-rename" rel="nofollow"><code>rename_axis</code></a> (new in <code>pandas</code> <code>0.18.0</code>) and <a href="http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.drop.html" rel="nofollow"><code>drop</code></a> unnecessary columns: </p> <pre><code>pivot = pivot.rename_axis(None, axis=1).drop(['x', 'y'], axis=1) print (pivot) C D A a 3 1+2 b 4 0+4 </code></pre> <p>But if want <code>Multiindex</code> in columns:</p> <pre><code>pivot = pd.pivot_table(rows,index=["A"], values=["C"], columns=["B"],fill_value=0) pivot['E'] = pivot["C"].sum(1) print (pivot) C E B x y A a 1 2 3 b 0 4 4 pivot["D"] = pivot[('C','x')].astype(str) + '+' + pivot[('C','y')].astype(str) print (pivot) C E D B x y A a 1 2 3 1+2 b 0 4 4 0+4 pivot = pivot.rename_axis((None,None), axis=1).drop('C', axis=1).rename(columns={'E':'C'}) pivot.columns = pivot.columns.droplevel(-1) print (pivot) C D A a 3 1+2 b 4 0+4 </code></pre> <p>EDIT:</p> <p>Another solution with <a href="http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.groupby.html" rel="nofollow"><code>groupby</code></a> and <a href="http://pandas.pydata.org/pandas-docs/stable/generated/pandas.MultiIndex.droplevel.html" rel="nofollow"><code>MultiIndex.droplevel</code></a>:</p> <pre><code>pivot = pd.pivot_table(rows,index=["A"], values=["C"], columns=["B"],fill_value=0) #remove top level of Multiindex in columns pivot.columns = pivot.columns.droplevel(0) print (pivot) B x y A a 1 2 b 0 4 wanted = rows.groupby("A").sum() wanted['D'] = pivot['x'].astype(str) + '+' + pivot['y'].astype(str) print (wanted) C D A a 3 1+2 b 4 0+4 </code></pre>