title: Dividing two columns of an unstacked dataframe
body: <p>I have two columns <strong>in a pandas dataframe.</strong></p>
  
  <p>Column 1 is ed and contains strings (e.g. 'a','a','b,'c','c','a')</p>
  
  <pre><code>ed column = ['a','a','b','c','c','a'] 
  </code></pre>
  
  <p>Column 2 is job and also contains strings (e.g. 'aa','bb','aa','aa','bb','cc')</p>
  
  <pre><code>job column = ['aa','bb','aa','aa','bb','cc'] #these are example values from column 2 of my pandas data frame
  </code></pre>
  
  <p>I then generate a two column frequency table like this:</p>
  
  <pre><code>my_counts= pdata.groupby(['ed','job']).size().unstack().fillna(0)
  </code></pre>
  
  <p>Now how do I then divide the frequencies in one column by the frequencies in another column of that frequency table?  I want to take that ratio and use it to <code>argsort()</code> so that I can sort by the calculated ratio but I don't know how to reference each column of the resulting table.</p>