text: Title: DOC: Pivot() example call incorrectly used and would give "error: duplicate index"
  Body: ### Pandas version checks
  
  - [x] I have checked that the issue still exists on the latest versions of the docs on `main` [here](https://pandas.pydata.org/docs/dev/)
  
  
  ### Location of the documentation
  
  doc/source/user_guide/reshaping.rst
  
  
  
  ### Documentation problem
  
  the table given as an example for pivot() is wrong and cant be used. it would return "error duplicate index" as there are duplicate values in the column given for "index" parameter.
  
  <img width="772" alt="Image" src="https://github.com/user-attachments/assets/d7198715-b74e-4c35-88f8-5a01ee8eefe4" />
  
  
  
  ### Suggested fix for documentation
  
  The "foo" column must contain unique values 