title: Add calculated column to a pandas pivot table
body: <p>I have created a pandas data frame and then converted it into pivot table.</p>
  
  <p>My pivot table looks like this:</p>
  
  <pre><code>Operators   TotalCB     Qd(cb)  Autopass(cb)
  Aircel India    55        11       44
  Airtel Ghana    20        17        3
  Airtel India    41         9        9
  Airtel Kenya    9          4        5
  Airtel Nigeria  24        17        7
  AT&amp;T USA        18        10        8
  </code></pre>
  
  <p>I was wondering how to add calculated columns so that I get my pivot table with Autopass% (<code>Autopass(cb)/TotalCB*100</code>) just like we are able to create them in Excel using calculated field option.</p>
  
  <p>I want my pivot table output to be something like below:</p>
  
  <pre><code>Operators   TotalCB     Qd(cb)  Autopass(cb)    Qd(cb)% Autopass(cb)%
  Aircel India    55          11    44             20%     80%
  Airtel Ghana    20          17     3             85%     15%
  Airtel India    41          29     9             71%     22%
  Airtel Kenya     9           4     5             44%     56%
  AT&amp;T USA        18          10     8             56%     44%
  </code></pre>
  
  <p>How do I define the function which calculates the percentage columns and how to apply that function to my two columns namely <code>Qd(cb)</code> and <code>Autopass(cb)</code> to give me additional calculated columns</p>