title: Pandas binning column values according to the index
body: <p>Currently, I have a DataFrame which holds the ages of a population of people and the frequency of those ages, like this:</p>
  
  <pre><code>      freq
   27    103
   28     43
   29     13
  ...    ...
   78     20
   79     13
  </code></pre>
  
  <p>The age is the index of the DataFrame. I would like to perform some Pandas magic so that I get a binned DataFrame like this:</p>
  
  <pre><code>           freq
   (20, 30]   308
   (30, 40]   111
   (40, 50]    85
   (50, 60]    58
   (60, 70]    63
   (70, 80]   101
  </code></pre>
  
  <p>So the index is now made up of intervals of ages, rather than individual ages and the frequencies are summed accordingly. How can I accomplish this?</p>