title: How to extract group name values at any groupby level in the grouping hierarchy
body: <p>I have a Pandas DataFrame <code>df</code> of 15 rows and three columns <code>['group_A', 'group_B', 'group_C']</code> denoting groups which are all of size 2 e.g. <code>group_A</code> has possible values <code>a1</code> and <code>a2</code>. The grouping hierarchy is as follows:</p>
  <pre><code>&gt;&gt;display(df.groupby(['group_A','group_B']).size())
  
  group_A  group_B  group_C   row_count
  a1       b1       c1            1
  
           b2       c1            2
                    c2            2
  
  a2       b1       c1            1
  
           b2       c1            1
                    c2            8
  </code></pre>
  <p>e.g. 8 rows of the DataFrame has group values <code>['a2', 'b2', 'c2']</code>. No rows have <code>['a1', 'b1', 'c2']</code>.</p>
  <p>I can extract the group-level membership sizes using <code>.size()</code>. So at the final grouping, I can get the <code>row_count</code> values <code>[1,2,2,1,1,8]</code>. How do I also extract the group values at the same grouping level, which I expect to be <code>[c1,c1,c2,c1,c1,c2]</code> in the order they appear in the hierarchy?</p>