title: Groupby, transpose and append in Pandas?
body: <p>I have a dataframe which looks like this:</p>
  
  <blockquote>
    <p><a href="https://i.stack.imgur.com/PuLyM.png" rel="noreferrer"><img src="https://i.stack.imgur.com/PuLyM.png" alt="enter image description here"></a></p>
  </blockquote>
  
  <p>Each user has 10 records. Now, I want to create a dataframe which looks like this:</p>
  
  <pre><code>userid  name1  name2  ... name10
  </code></pre>
  
  <p>which means I need to invert every 10 records of the column <code>name</code> and append to a new dataframe.</p>
  
  <p>So, how do it do it? Is there any way I can do it in Pandas?</p>