title: group by within group by in pandas
body: <p>Consider the following dataset:</p>
  
  <pre><code>min    5-min     a
  0       0        800
  0       0        801
  1       0        802
  1       0        803
  1       0        804
  2       0        805
  2       0        805
  2       0        810
  3       0        801
  3       0        802
  3       0        803
  4       0        804
  4       0        805
  5       1        806
  5       1        800
  5       1        890
  6       1        890
  6       1        880
  6       1        800
  7       1        804
  7       1        806
  8       1        801
  9       1        800
  9       1        900
  10      1        770
  10      1        803
  10      1        811
  </code></pre>
  
  <p>I need to calculate std of a on each group based on the minute and then calculate the mean of the results values in each group of 5 min.
  I do not know how to find the border of 5 min, after calculation of std.
  How should I save the data to know which std belong to each group of 5 min?</p>
  
  <pre><code>data.groupby('minute').a.std()
  </code></pre>
  
  <p>I would appreciate of any help.</p>