title: Loop through every nth group of a groupby object
body: <p>I am currently iterating over a groupby object in the usual way</p>
  
  <pre><code>for key, df_reduced in df.groupby(level='level_key'):
  </code></pre>
  
  <p>Is there an easy way to iterate through every nth group in the groupby instead? For example, the 1st group, 4th group, 7th group etc.</p>
  
  <p>One way to do this would be</p>
  
  <pre><code>counter = 0
  for key, df_reduced in df.groupby(level='level_key'):
      counter += 1
      counter = counter % 3
      if counter != 0:
          continue
  </code></pre>
  
  <p>Is there an cleaner way to do this, eg. for a standard python list to loop over every 3rd item I would do</p>
  
  <pre><code>for l in list[::3]:
  </code></pre>