Skip to content

BUG: concat raises when all indexes are the same and keys are duplicated #43595

Closed
@rhshadrach

Description

@rhshadrach

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pandas.

  • I have confirmed this bug exists on the master branch of pandas.

Reproducible Example

keys = ["e", "e"]
df = pd.DataFrame({"a": [1, 2, 3], "b": [4, 5, 6]})
result = pd.concat([df, df], axis=1, keys=keys)

Issue Description

concat raises when all the indexes of objs argument are the same and there are duplicates in the keys argument.

Expected Behavior

Not to raise.

Installed Versions

Replace this line with the output of pd.show_versions()

Metadata

Metadata

Assignees

Labels

BugReshapingConcat, Merge/Join, Stack/Unstack, Explode

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions