title: Iterating over a time series
body: <p>I have a data set indexed by time (time series). I have to calculate, for each day, the average of my variable every 5 data this is my code :</p>
  <pre><code>dftec=dftec.groupby([dftec[&quot;Datetime&quot;].dt.day])
  
  for key, item in dftec:
      df = dftec.get_group(key)
      print(df)
  </code></pre>
  <p>It works i have df for each day
  But when i try to iterate like this :</p>
  <pre><code>for key, item in dftec:
  d=[]
  df = dftec.get_group(key)
  print(df)
  for i in range(1, df.shape[0], 5):
      d.append(df['debitVD'].iloc[i:i + 5, :].mean())
      print(d)
  </code></pre>
  <p>I've got the following error : pandas.core.indexing.IndexingError: Too many indexers (on the line d.append)</p>