title: Append first row by group to original data
body: <p>I have data with a grouping variable &quot;ID&quot; and some values:</p>
  <pre><code>ID, Value
  1, 1
  1, 2
  1, 3
  1, 4
  2, 5
  2, 6 
  2, 7
  2, 8
  </code></pre>
  <p>Within each group, I want to append the first row after the last row.
  Desired result:</p>
  <pre><code>ID, Value
  1, 1
  1, 2
  1, 3
  1, 4
  1, 1 # First row of ID 1 inserted as last row in the group
  2, 5
  2, 6 
  2, 7
  2, 8
  2, 5 # First row of ID 2 inserted as last row in the group
  </code></pre>
  <p>I have 5000 row of this.</p>