title: How do I generate a duplicate index based on duplicate values in a different column in Pandas
body: <h3>starting data</h3>
  
  <p>I want to generate an incrementing index that takes in consideration duplicates in the ['name'] column.</p>
  
  <pre><code>name
  vendor1
  vendor2
  vendor2
  vendor3
  vendor4
  vendor4
  vendor4
  vendor4
  </code></pre>
  
  <h3>desired output</h3>
  
  <pre><code>id    name
  1     vendor1
  2     vendor2
  2     vendor2
  3     vendor3
  4     vendor4
  4     vendor4
  4     vendor4
  4     vendor4
  </code></pre>