How to convert a column into an index with the same existing values as indices?
<p>I have a <code>DataFrame</code> called <code>products</code> and it has this structure and data:</p>

<p><a href="https://i.stack.imgur.com/Veli7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Veli7.png" alt="Products"></a></p>

<p>I want to know how do I convert the <code>Product ID</code> index into a column with the same values and become the index for the <code>DataFrame</code>.</p>

<p>I've tried </p>

<pre><code>products = products.reset_index()
</code></pre>

<p>and this is what I got:</p>

<p><a href="https://i.stack.imgur.com/6oFnN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6oFnN.png" alt="new products DataFrame"></a></p>

<p>What I want to get is:</p>

<p><a href="https://i.stack.imgur.com/RMVQ9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RMVQ9.png" alt="New DataFrame with the required index"></a></p>