title: How to pandas groupby specific value in a column?
body: <p>I have a dataframe with multiple columns using with added a new column for age intervals. </p>
  
  <pre><code># Create Age Intervals
  bins = [0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100]
  df['age_intervals'] = pd.cut(df['age'],bins)
  </code></pre>
  
  <p>Now, I've another column named <code>no_show</code> that states whether a person shows up for the appointment or not using values 0 or 1. By using the below code, I'm able to groupby the data based on <code>age_intervals</code>. </p>
  
  <pre><code>df[['no_show','age_intervals']].groupby('age_intervals').count()
  
  Output: 
  age_intervals   no_show
    (0, 5]        8192
   (5, 10]        7017
  (10, 15]        5719
  (15, 20]        7379
  (20, 25]        6750
  </code></pre>
  
  <p>But how can I group the <code>no_show</code> data based on its values 0 and 1. For example, in the age interval (0,5], out of 8192, 3291 are 0 and 4901 are 1 for <code>no_show</code> and so on.</p>