title: Categorical occurence counting among subjects
body: <p>I have binned reaction time (IRIBP15 in the df) into categories. I'd like to count, for each participant, the number of reaction time in each categories. I tried :</p>
  <pre><code>df['count'] = df.groupby(['Subject','Ctg']).df['Ctg'].count().reset_index()
  </code></pre>
  <p>but it is returning me 'DataFrameGroupBy' object has no attribute 'df', and I'm not sure about my line.</p>
  <pre><code>     Subject  IRIBP15  Category
  0         50.0    332.0  375
  1         50.0    206.0  225
  2         50.0    251.0  275
  3         50.0    478.0  525
  4         50.0    382.0  425
  ...        ...      ...  ...
  55291     73.0    165.0  175
  55292     73.0    -83.0  -75
  55293     73.0    142.0  175
  55294     73.0    102.0  125
  55295     73.0     -5.0   25
  </code></pre>
  <p>I'd like to have an output with the subject id (number), each category (375, 225...for example), and the number of reaction time observed in each category.
  I hope I'm clear enough. Thanks!</p>