title: How to pass the same index on a column for duplicate pairs on another column?
body: <p>I'm trying to give the same index for duplicates values on my <code>Dataframe</code>. Note that the index must be on a column</p>
  
  <p>I've managed to find the duplicates and their respective position on the Dataframe. I don't know how to set values on the found duplicate pairs.</p>
  
  <pre class="lang-py prettyprint-override"><code>def double_finder(dataframe, where: str):
      new_index = 10000 #new index start 
      df = dataframe[where]
      new_list = df.values.tolist()
  
      d = pd.DataFrame({"data": new_list})
      f = d.groupby("data").groups # this creates a dict class with the values 
                                   # of the Dataframe and their position 
                                   # on the Dataframe
  </code></pre>
  
  <p>so <code>new list</code> has the form of <code>['a-4', 'b-210', 'a-4', 'z-b', 'c-a', 'b-210']</code>
  . The <code>f</code>'s outcome looks like this <code>"a-4": Int64Index: [0 , 2], "b-210": Int64Index: [1, 4], "z-b": Int64Index: [3]</code> etc.</p>
  
  <p>I want to achieve something like this on my final <code>Dataframe</code>:
  <code>
  index_col, data
   0, a-4
   1, b-210
   0, a-4
   2, z-b
   3, c-a
   1, b-210</code></p>