title: How to add interleaving rows as result of sort / groups?
body: <p>I have the following sample input data:</p>
  <pre><code>import pandas as pd
  df = pd.DataFrame({'col1': ['x', 'y', 'z'], 'col2': [1, 2, 3], 'col3': ['a', 'a', 'b']})
  </code></pre>
  <p>I would like to sort and group by <code>col3</code> while interleaving the summaries on top of the corresponding group in <code>col1</code> and get the following output:</p>
  <pre><code>    col1  col2
  0     a      3
  1     x      1
  2     y      2
  3     b      3
  4     z      3  
  </code></pre>
  <p>I can of course do the part:</p>
  <pre><code>df.sort_values(by=['col3']).groupby(by=['col3']).sum()
  
        col2
  col3      
    a      3
    b      3
  </code></pre>
  <p>but I am not sure how to interleave the group labels on top of <code>col1</code>.</p>