title: Group every value within an hour into one value which is it's mean
body: <p>I need a mean of all the values within that hour and I need to do it for all such hours for each day.</p>
  
  <p>For Example:</p>
  
  <pre><code>Date                    Col1
  2016-01-01 07:00:00      1
  2016-01-01 07:05:00      2
  2016-01-01 07:17:00      3
  2016-01-01 08:13:00      2
  2016-01-01 08:55:00      10
  .
  .
  .
  .
  .
  .
  .
  .
  2016-12-31 22:00:00      3
  2016-12-31 22:05:00      3
  2016-12-31 23:13:00      4
  2016-12-31 23:33:00      5
  2016-12-31 23:53:00      6
  </code></pre>
  
  <p>So, I need to group all the values within that hour within that date into one ( it's mean ).</p>
  
  <p><strong>Expected Output:</strong></p>
  
  <pre><code>Date                    Col1
  2016-01-01 07:00:00      2           ##(2016-01-01 07:00:00, 07:05:00, 07:17:00) 3 values falls between the one hour range for that date i.e. 2016-01-01 07:00:00 - 2016-01-01 07:59:00, both inclusive.
  2016-01-01 08:00:00      6
  .
  .
  .
  .
  .
  .
  .
  .
  2016-12-31 22:00:00      3
  2016-12-31 23:00:00      5
  </code></pre>
  
  <p>So, if I do it for whole year then in the end the total number of rows would be 365*24.</p>
  
  <p>I tried solving using this <a href="https://stackoverflow.com/questions/43795118/python-how-to-group-values-with-same-hour-stamp-but-different-dates-by-hour">answer</a> but it doesn't work.
  Can anyone help me?  </p>