title: Is there an "ungroup by" operation opposite to .groupby in pandas?
body: <p>Suppose we take a pandas dataframe...</p>
  
  <pre><code>    name  age  family
  0   john    1       1
  1  jason   36       1
  2   jane   32       1
  3   jack   26       2
  4  james   30       2
  </code></pre>
  
  <p>Then do a <code>groupby()</code> ...</p>
  
  <pre><code>group_df = df.groupby('family')
  group_df = group_df.aggregate({'name': name_join, 'age': pd.np.mean})
  </code></pre>
  
  <p>Then do some aggregate/summarize operation (in my example, my function <code>name_join</code> aggregates the names):</p>
  
  <pre><code>def name_join(list_names, concat='-'):
      return concat.join(list_names)
  </code></pre>
  
  <p>The grouped summarized output is thus:</p>
  
  <pre><code>        age             name
  family                      
  1        23  john-jason-jane
  2        28       jack-james
  </code></pre>
  
  <h1><strong>Question:</strong></h1>
  
  <p>Is there a quick, efficient way to get to the following from the aggregated table?</p>
  
  <pre><code>    name  age  family
  0   john   23       1
  1  jason   23       1
  2   jane   23       1
  3   jack   28       2
  4  james   28       2
  </code></pre>
  
  <p>(Note: the <code>age</code> column values are just examples, I don't care for the information I am losing after averaging in this specific example)</p>
  
  <p>The way I thought I could do it does not look too efficient:</p>
  
  <ol>
  <li>create empty dataframe</li>
  <li>from every line in <code>group_df</code>, separate the names</li>
  <li>return a dataframe with as many rows as there are names in the starting row</li>
  <li>append the output to the empty dataframe</li>
  </ol>