title: about concat in pandas : using row data to create new columns
body: <p>The same question has been posted on pydata google group.</p>
  
  <p>I want to do a custom concat i.e using the rows in a group by object
  to create new cols.</p>
  
  <p>Here is an contrived example:</p>
  
  <pre><code>Input data frame
  name age
  foo     12
  bar     14
  
  df = pandas.DataFrame({  'name':['foo','bar'],'age': [12,14] })
  
  
  
  expected output, a pandas data frame with four cols 
  foo 12 bar 14
  </code></pre>
  
  <p>PS: I am looking for an efficient solution as this would be applied to
  a grouped pandas object containing 800k odd groupings.</p>
  
  <p>Sample 800k data would have following structure. I am still using an analogy as actual data is scientific and column names might not be intuitive</p>
  
  <pre><code>Subject (grouped by col)
            Name     Age        mark1   
            Foo      12         80     
            Bar      14         90 
  </code></pre>
  
  <p>What we want from this grouped by data is the following data frame</p>
  
  <pre><code>Subject Foo 12 80 Bar 14 90
  </code></pre>