Skip to content

BUG: Multijoining indexes always returns indexers, ignores function parameters #34074

Closed
@CuylenE

Description

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

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

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


Code Sample

>>>frame = pd.DataFrame([(1,2,3,4),(4,5,6,7)],columns=["i1", "i2", "i3","val"]).set_index(["i1","i2","i3"])
>>>frame2 = pd.DataFrame([(1,2,3),(4,5,6)],columns=["i1", "i2", "val"]).set_index(["i1","i2"])
>>>frame.index.join(frame2.index,return_indexers=False)
(MultiIndex([(1, 2, 3),
            (4, 5, 6)],
           names=['i1', 'i2', 'i3']), None, None)

Problem description

Parameter return_indexers is ignored in some cases of __join_multi

Expected Output

>>>frame.index.join(frame2.index,return_indexers=False)
MultiIndex([(1, 2, 3),
            (4, 5, 6)],
           names=['i1', 'i2', 'i3'])

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions