title: Group by Columns and use Grouper 8h interval
body: <p>I have a df</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th style="text-align: left;">Animal</th>
  <th style="text-align: center;">Starttime</th>
  <th style="text-align: right;">dosis</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td style="text-align: left;">Tiger</td>
  <td style="text-align: center;">2019-02-18 10:06:00</td>
  <td style="text-align: right;">20</td>
  </tr>
  <tr>
  <td style="text-align: left;">Tiger</td>
  <td style="text-align: center;">2019-02-19 10:06:00</td>
  <td style="text-align: right;">2</td>
  </tr>
  <tr>
  <td style="text-align: left;">Fish</td>
  <td style="text-align: center;">2018-02-18 10:06:00</td>
  <td style="text-align: right;">2</td>
  </tr>
  <tr>
  <td style="text-align: left;">Ape</td>
  <td style="text-align: center;">2021-04-10 10:06:00</td>
  <td style="text-align: right;">12</td>
  </tr>
  <tr>
  <td style="text-align: left;">Ape</td>
  <td style="text-align: center;">2021-04-10 12:06:00</td>
  <td style="text-align: right;">2</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>Target df:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th style="text-align: left;">Animal</th>
  <th style="text-align: center;">Starttime</th>
  <th style="text-align: right;">dosis</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td style="text-align: left;">Tiger</td>
  <td style="text-align: center;">2019-02-18 16:00:00</td>
  <td style="text-align: right;">20</td>
  </tr>
  <tr>
  <td style="text-align: left;">Tiger</td>
  <td style="text-align: center;">2019-02-19 16:00:00</td>
  <td style="text-align: right;">2</td>
  </tr>
  <tr>
  <td style="text-align: left;">Fish</td>
  <td style="text-align: center;">2018-02-18 16:00:00</td>
  <td style="text-align: right;">2</td>
  </tr>
  <tr>
  <td style="text-align: left;">Ape</td>
  <td style="text-align: center;">2021-04-10 16:00:00</td>
  <td style="text-align: right;">14</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>In the starting df are different animals with different timestamps for each dose they have received. The desired output is grouped according to the animals and where the doses they received are summed up in the interval of 8h.</p>
  <p>It works fine if I just use grouper and freq= 8h but then it gets grouped according to the times and the the animals are ignored.
  So that's when I tried this out, group first the df and then apply the the grouper object but this  does not work.</p>
  <p><code>df.groupby(pd.Grouper(key=('Animal','Starttime'), freq='8h')).sum()</code></p>
  <p><code>df.groupby('Animal').apply(pd.Grouper(key='Starttime', freq='8h')).sum()</code></p>
  <p>Any help or advice is very much appreciated.
  thanks</p>