title: Get Dataframe from pandas groupby (pd.grouper)
body: <p>From the below data, i need to create daywise chunk through iteration</p>
  <pre><code> data:
         lable        datetime    value             daytime
      0   tag1  5/30/2022 0:00  361.378 2022-05-30 00:00:00
      1   tag1  5/30/2022 0:01  344.072 2022-05-30 00:01:00
      2   tag1  5/30/2022 0:02  321.001 2022-05-30 00:02:00
      3   tag1  5/30/2022 0:03  296.715 2022-05-30 00:03:00
      4   tag1  5/30/2022 0:04  272.290 2022-05-30 00:04:00
      5   tag1  5/30/2022 0:05  250.708 2022-05-30 00:05:00
      6   tag1  5/31/2022 0:06  283.087 2022-05-31 00:06:00
      7   tag1  5/31/2022 0:07  314.322 2022-05-31 00:07:00
      8   tag1  5/31/2022 0:08  345.811 2022-05-31 00:08:00
      9   tag1  5/31/2022 0:09  362.085 2022-05-31 00:09:00
      10  tag1  5/31/2022 0:10  363.021 2022-05-31 00:10:00
      11  tag1  5/31/2022 0:11  364.575 2022-05-31 00:11:00
      12  tag1  5/31/2022 0:12  361.114 2022-05-31 00:12:00
  </code></pre>
  <p>I have used the below code. I am creating a &quot;daytime&quot; column from datetime as i was not able to use the groupby. it was giving type error <code>TypeError: Only valid with DatetimeIndex, TimedeltaIndex or PeriodIndex, but got an instance of 'Index'</code> (when i was trying <code>data.groupby(pd.Grouper(key='datetime', freq='D'))</code></p>
  <pre><code>data['daytime'] = pd.to_datetime(data.datetime)
  data_grp = data.groupby(pd.Grouper(key='daytime', freq='D'))
  </code></pre>
  <p>then to get the daywise chunk, i use the below code</p>
  <pre><code>for i in data_grp:
      day_chunk = i
      print type(day_chunk)
  
  Output:
  (Timestamp('2022-05-30 00:00:00', freq='D'),   lable        datetime    value             daytime
  0  tag1  5/30/2022 0:00  361.378 2022-05-30 00:00:00
  1  tag1  5/30/2022 0:01  344.072 2022-05-30 00:01:00
  2  tag1  5/30/2022 0:02  321.001 2022-05-30 00:02:00
  3  tag1  5/30/2022 0:03  296.715 2022-05-30 00:03:00
  4  tag1  5/30/2022 0:04  272.290 2022-05-30 00:04:00
  5  tag1  5/30/2022 0:05  250.708 2022-05-30 00:05:00)
  &lt;type 'tuple'&gt;
  (Timestamp('2022-05-31 00:00:00', freq='D'),    lable        datetime    value             daytime
  6   tag1  5/31/2022 0:06  283.087 2022-05-31 00:06:00
  7   tag1  5/31/2022 0:07  314.322 2022-05-31 00:07:00
  8   tag1  5/31/2022 0:08  345.811 2022-05-31 00:08:00
  9   tag1  5/31/2022 0:09  362.085 2022-05-31 00:09:00
  10  tag1  5/31/2022 0:10  363.021 2022-05-31 00:10:00
  11  tag1  5/31/2022 0:11  364.575 2022-05-31 00:11:00
  12  tag1  5/31/2022 0:12  361.114 2022-05-31 00:12:00)
  &lt;type 'tuple'&gt;
  </code></pre>
  <p>I want output as a dataframe and not tuple. can you please tell me how to get the day_chuck as pandas.core.frame.DataFrame</p>