title: How to keep original index of a DataFrame after groupby 2 columns?
body: <p>Is there any way I can retain the original index of my large dataframe after I perform a groupby? The reason I need to this is because I need to do an inner merge back to my original df (after my groupby) to regain those lost columns. And the index value is the only 'unique' column to perform the merge back into. Does anyone know how I can achieve this?</p>
  
  <p>My DataFrame is quite large. 
  My groupby looks like this: </p>
  
  <pre><code>df.groupby(['col1', 'col2']).agg({'col3': 'count'}).reset_index()
  </code></pre>
  
  <p>This drops my original indexes from my original dataframe, which I want to keep. </p>