title: Groupby on two columns with bins(ranges) on one of them in Pandas Dataframe
body: <p>I am trying to make segregate my data into buckets based on certain user attributes and I would like to see some counts in each of the buckets.For this I have imported this data into a Pandas Dataframe.</p>
  
  <p>I have data that has user city, kids age and their unique id. I would like to know the count of users who reside in city A and have kids in age group 0-5.</p>
  
  <p>Sample Data frame looks something like this: </p>
  
  <pre><code>city  kids_age  user_id
  A         10       1  
  B          4       2
  A          4       3        
  C          8       4
  A          3       5 
  </code></pre>
  
  <p>Expected Output:</p>
  
  <pre><code>city   bin   count
  A      0-5      2 
         5-10     1
  
  B      0-5      1
         5-10     0
  
  C      0-5      0
         5-10     1
  </code></pre>
  
  <p>I tried group by on two columns city and kids age:</p>
  
  <pre><code>user_details_df_cropped_1.groupby(['city', 'kids_age']).count()
  </code></pre>
  
  <p>It gave me an output that looks something like this:</p>
  
  <pre><code>city  kids_age  user_id   count
   A      10       1          1
           4       3          1
           3       5          1
   B       4       2          1 
   C       8       4          1
  </code></pre>
  
  <p>I returns me the users grouped by city, but not really by kids age bins(ranges). What am I missing here? Appreciate the help!!</p>