title: how to calculate % of row and % of column for a python pivot with row and column headings?
body: <p>For this simple pivot, how to turn value into % of row, and likewise to % of column?</p>
  
  <pre><code>import pandas as pd
  df = pd.DataFrame({'A' : ['one', 'one', 'two', 'three'] * 3,
                     'B' : ['A', 'B', 'C'] * 4,
                 'C' : range(12)})
  pd.pivot_table(df, index='A', columns='B', aggfunc=sum)
  </code></pre>
  
  <p>Somehow after some searching I don't find answer to this simple question. </p>
  
  <p>Expected result (if getting % of column)</p>
  
  <pre><code>      A   B  C
  ONE   50% 24% 50%
  THREE 13% 31% 42%
  TWO  36% 45% 8%
  </code></pre>
  
  <p>Thanks</p>