title: Is there anyway to ungroup data in a grouped-by pandas dataframe?
body: <p>I have a dataset that for simplicity I need to group by and aggregate based on one column so that I can remove some rows easily. Once I am done with the calculations, I need to reverse the group by actions so that I can see the dataframe easily in excel. If I do not inverse the action, I would export the whole list to excel which is not easy to analyse. Any help is gretaly appreciated.</p>
  
  <p>Example:</p>
  
  <pre><code>Col1  Col2 Col3
  123   11   Yes
  123   22   Yes
  256   33   Yes
  256   33   No
  337   00   No
  337   44   No
  </code></pre>
  
  <p>After applying groupby and aggregate: </p>
  
  <pre><code>X=dataset.groupby('Col1').agg(lambda x:set(x)).reset_index()
  </code></pre>
  
  <p>I get</p>
  
  <pre><code>Col1   Col2      Col3
  123   {11,22}   {Yes}
  256   {33}      {Yes, No}
  337   {00,44}   {No}
  </code></pre>
  
  <p>I then remove all the columns that contain Yes using drop</p>
  
  <pre><code>X=X.reset_index(drop=True)
  </code></pre>
  
  <p>what I need to get before exporting to excel is</p>
  
  <pre><code>Col1 Col2 Col3
  337   00   No
  337   44   No
  </code></pre>
  
  <p>Hope this is clear enough</p>
  
  <p>Thaks in advance</p>