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()