title: Unexpected gaps in timestamps when using Pandas.DataFrame.GroupBy on a string column and with Pandas.Grouper for DatetimeIndex
body: <p>Hello StackOverFlow friends!</p>
  <p>I am attempting to calculate an aggregate sum with Pandas.DataFrame.groupby over two keys, one of which is a column of type String and the other is a time-series index (DatetimeIndex for the observation timestamps).</p>
  <p>I used the following code and experienced the unexpected result of measurement_end_time being discontinuous with intervals between time groups exceeding the expected 1 hour at the times when there were no data points for a specific server in the DataFrame (read further for an example that explains why I expect a different result):</p>
  <pre><code>df.groupby(by=['server_fqdn', pd.Grouper(freq='1H')]).total_test_count.sum()
  
  server_fqdn                       measurement_end_time     
  server1.company.com               2021-05-01 00:00:00+00:00     80
                                    2021-05-01 04:00:00+00:00    130
                                    2021-05-01 07:00:00+00:00      3
                                    2021-05-01 08:00:00+00:00     87
                                    2021-05-01 11:00:00+00:00      3
                                    2021-05-01 12:00:00+00:00    129
                                    2021-05-01 16:00:00+00:00     90
                                    2021-05-01 20:00:00+00:00    137
                                    2021-05-01 22:00:00+00:00      3
                                    2021-05-02 00:00:00+00:00    136
                                    2021-05-02 04:00:00+00:00     92
                                    2021-05-02 08:00:00+00:00     95
                                    2021-05-02 12:00:00+00:00     68
                                    2021-05-02 16:00:00+00:00    103
                                    2021-05-02 18:00:00+00:00      3
                                    2021-05-02 20:00:00+00:00    120
                                    2021-05-03 00:00:00+00:00     92
   
  server2.company.com               2021-05-01 00:00:00+00:00    452
                                    2021-05-01 01:00:00+00:00      7
                                    2021-05-01 03:00:00+00:00     10
                                    2021-05-01 04:00:00+00:00    446
                                    2021-05-01 07:00:00+00:00      7
                                    2021-05-01 08:00:00+00:00    495
                                    2021-05-01 10:00:00+00:00      3
                                    2021-05-01 11:00:00+00:00      6
                                    2021-05-01 12:00:00+00:00    423
                                    2021-05-01 13:00:00+00:00     15
                                    2021-05-01 14:00:00+00:00     14
                                    2021-05-01 15:00:00+00:00     11
                                    2021-05-01 16:00:00+00:00    422
                                    2021-05-01 17:00:00+00:00     14
                                    2021-05-01 18:00:00+00:00      4
                                    2021-05-01 19:00:00+00:00     13
                                    2021-05-01 20:00:00+00:00    447
                                    2021-05-01 21:00:00+00:00      7
                                    2021-05-01 22:00:00+00:00      8
                                    2021-05-01 23:00:00+00:00      7
                                    2021-05-02 00:00:00+00:00    420
                                    2021-05-02 01:00:00+00:00      6
  
  Name: total_test_count, Length: 145776, dtype: int64
  </code></pre>
  <p>My expectation is for the measurement_end_time timestamp intervals to be completed with the missing hours so that measurement_end_time is contiguous with 1 hour intervals through all 24 hours of the day and with zero values for the sum of the missing timestamp intervals as follows:</p>
  <pre><code>server_fqdn                       measurement_end_time     
  server1.company.com               2021-05-01 00:00:00+00:00     80
                                    2021-05-01 01:00:00+00:00      0
                                    2021-05-01 02:00:00+00:00      0
                                    2021-05-01 03:00:00+00:00      0
                                    2021-05-01 04:00:00+00:00    130
                                    2021-05-01 05:00:00+00:00      0
                                    2021-05-01 06:00:00+00:00      0
                                    2021-05-01 07:00:00+00:00      3
                                    2021-05-01 08:00:00+00:00     87
                                    2021-05-01 09:00:00+00:00      0
                                    2021-05-01 10:00:00+00:00      0
                                    2021-05-01 11:00:00+00:00      3
                                    2021-05-01 12:00:00+00:00    129
                                    2021-05-01 13:00:00+00:00      0
                                    2021-05-01 14:00:00+00:00      0
                                    2021-05-01 15:00:00+00:00      0
                                    2021-05-01 16:00:00+00:00     90
                                    2021-05-01 17:00:00+00:00      0
                                    2021-05-01 18:00:00+00:00      0
                                    2021-05-01 19:00:00+00:00      0
                                    2021-05-01 20:00:00+00:00    137
                                    2021-05-01 21:00:00+00:00      0
                                    2021-05-01 22:00:00+00:00      3
                                    2021-05-01 23:00:00+00:00      0
                                    2021-05-02 00:00:00+00:00    136
                                    2021-05-02 01:00:00+00:00      0
                                    2021-05-02 02:00:00+00:00      0
                                    2021-05-02 03:00:00+00:00      0
                                    2021-05-02 04:00:00+00:00     92
                                    2021-05-02 05:00:00+00:00      0
                                    2021-05-02 06:00:00+00:00      0
                                    2021-05-02 07:00:00+00:00      0
                                    2021-05-02 08:00:00+00:00     95
                                                                ... 
                                    2021-05-02 20:00:00+00:00    120
                                    2021-05-02 21:00:00+00:00      0
                                    2021-05-02 22:00:00+00:00      0
                                    2021-05-02 23:00:00+00:00      0
                                    2021-05-03 00:00:00+00:00     92
   
  server2.company.com               2021-05-01 00:00:00+00:00    452
                                    2021-05-01 01:00:00+00:00      7
                                    2021-05-01 02:00:00+00:00      0
                                    2021-05-01 03:00:00+00:00     10
                                    2021-05-01 04:00:00+00:00    446
                                    2021-05-01 05:00:00+00:00      0
                                    2021-05-01 06:00:00+00:00      0
                                    2021-05-01 07:00:00+00:00      7
                                    2021-05-01 08:00:00+00:00    495
                                                                ... 
  
  Name: total_test_count, Length: 145776, dtype: int64
  </code></pre>
  <p>Note that I expect the result above given that the following command that aggregates only by the DatetimeIndex yields the expected results for the measurement_end_time correctly:</p>
  <pre><code>df.loc[df.server_fqdn == 'server1.company.com'].groupby(by=pd.Grouper(freq='1H')).total_test_count.sum()
  measurement_end_time
  2021-05-01 00:00:00+00:00     80
  2021-05-01 01:00:00+00:00      0
  2021-05-01 02:00:00+00:00      0
  2021-05-01 03:00:00+00:00      0
  2021-05-01 04:00:00+00:00    130
  2021-05-01 05:00:00+00:00      0
  2021-05-01 06:00:00+00:00      0
  2021-05-01 07:00:00+00:00      3
  2021-05-01 08:00:00+00:00     87
  2021-05-01 09:00:00+00:00      0
  2021-05-01 10:00:00+00:00      0
  2021-05-01 11:00:00+00:00      3
  2021-05-01 12:00:00+00:00    129
  2021-05-01 13:00:00+00:00      0
  2021-05-01 14:00:00+00:00      0
  2021-05-01 15:00:00+00:00      0
  2021-05-01 16:00:00+00:00     90
  2021-05-01 17:00:00+00:00      0
  2021-05-01 18:00:00+00:00      0
  2021-05-01 19:00:00+00:00      0
  2021-05-01 20:00:00+00:00    137
  2021-05-01 21:00:00+00:00      0
  2021-05-01 22:00:00+00:00      3
  2021-05-01 23:00:00+00:00      0
  2021-05-02 00:00:00+00:00    136
  2021-05-02 01:00:00+00:00      0
  2021-05-02 02:00:00+00:00      0
  2021-05-02 03:00:00+00:00      0
  2021-05-02 04:00:00+00:00     92
  2021-05-02 05:00:00+00:00      0
  2021-05-02 06:00:00+00:00      0
  2021-05-02 07:00:00+00:00      0
  2021-05-02 08:00:00+00:00     95
  
  </code></pre>
  <p>I am hoping for an explanation for this unexpected outcome and a Python/Pandas solution that gets me the expected outcome as described.</p>
  <p>Thanks in advance StackOverFlow Community!</p>