title: Pandas: add crosstab totals
body: <p>How can I add to my crosstab an additional row and an additional column for the totals?</p>
  
  <pre><code>df = pd.DataFrame({"A": np.random.randint(0,2,100), "B" : np.random.randint(0,2,100)})
  ct = pd.crosstab(new.A, new.B)
  ct
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/ZdONY.png" alt="enter image description here"></p>
  
  <p>I thought I would add the new column (obtained by summing over the rows) by</p>
  
  <pre><code>ct["Total"] = ct.0 + ct.1
  </code></pre>
  
  <p>but this does not work.</p>