title: Copying duplicate values into a new column
body: <p><a href="https://i.stack.imgur.com/JKGuz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JKGuz.png" alt="enter image description here" /></a></p>
  <p>I am having an issue replicating something in pandas to R.</p>
  <p>I want to get the duplicated products with the same Order ID together in a new column</p>
  <p>This is how it was done in pandas.</p>
  <p><a href="https://i.stack.imgur.com/0VyP7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0VyP7.png" alt="Pandas Code" /></a></p>
  <p>I did this <a href="https://i.stack.imgur.com/j3rMe.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/j3rMe.png" alt="My first R code" /></a></p>
  <p>and this
  <a href="https://i.stack.imgur.com/r5GA4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/r5GA4.png" alt="Second R code" /></a></p>
  <p>I got an error on both.
  Any help will be applicated.</p>
  <p>I took out the spread function and I got this:</p>
  <p><a href="https://i.stack.imgur.com/kgHLM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kgHLM.png" alt="enter image description here" /></a></p>
  <p>No value was in the Group_Product column but just &lt;S3: grouped_df&gt;.</p>
  <p>How do I fix it?</p>