Skip to content

DOC: Pivot() example call incorrectly used and would give "error: duplicate index" #61058

Open
@mheskett

Description

@mheskett

Pandas version checks

  • I have checked that the issue still exists on the latest versions of the docs on main here

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.

Image

Suggested fix for documentation

The "foo" column must contain unique values

Metadata

Metadata

Assignees

No one assigned

    Labels

    Error ReportingIncorrect or improved errors from pandasNeeds InfoClarification about behavior needed to assess issueReshapingConcat, Merge/Join, Stack/Unstack, Explode

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions