title: create hourly interval and loop through to get value_counts python pandas
body: <p>I have a dataframe with datetimeindex from 2019-04-25 15:00:00 until 2019-04-26 15:00:00</p>
  
  <p>for each hour I want to find df["mode"].value_counts() to see how many mode counts there are each hour.</p>
  
  <p>so between_time("08:00", "08:02"), between_time("09:00", "09:02"),between_time("10:00", "10:02"), and so on...</p>
  
  <p>my dataframe looks something like:</p>
  
  <pre><code>                        serial_number     mode
  gps_updated_at
  
  2019-04-26 15:01:00       A               standby
  2019-04-26 15:02:00       A               standby
  2019-04-26 15:02:00       B               standby
  2019-04-26 15:02:00       B               good
  2019-04-26 16:00:00       B               good
  2019-04-26 16:01:00       C               bad
  </code></pre>
  
  <p>so for each hour I want to get (15:00:00)</p>
  
  <pre><code>standby  3
  good     1
  </code></pre>
  
  <p>and 16:00:00</p>
  
  <pre><code>good      1
  bad       1
  </code></pre>
  
  <p>How can I make an efficient for loop to increment by an hour.</p>