title: pandas: groupby multiple columns. How to get all combinations?
body: <p>I have the following dataframe describing persons, where age_range has been computed from the age column</p>
  
  <pre><code>   age  gender group    age_range
  0   46  F      1       &gt;= 30 and &lt; 60
  1   50  F      1       &gt;= 30 and &lt; 60
  2   63  F      2       &gt;= 60
  3   65  F      2       &gt;= 60
  4   34  F      1       &gt;= 30 and &lt; 60
  5   42  F      2       &gt;= 30 and &lt; 60
  6   55  F      1       &gt;= 30 and &lt; 60
  7   57  M      1       &gt;= 30 and &lt; 60
  </code></pre>
  
  <p>From there, I would like a table giving for each group, all age_ranges and the number of persons from the group and the age_range, even for empty bins (no person &lt; 30 in any of the two groups and all members of group 1 are in >= 30 and &lt; 60).</p>
  
  <p>How could I get something like the following?</p>
  
  <pre><code>    group   age_range       count
  0   1       &lt; 30            0
  1   1       &gt;= 30 and &lt; 60  5
  2   1       &gt;= 60           0
  3   2       &lt; 30            0
  4   2       &gt;= 30 and &lt; 60  1
  5   2       &gt;= 60           2
  </code></pre>
  
  <p>I tried multiple groupby options but never managed to get a complete table.</p>