Skip to content

DataFrame Merge Multiple Columns #5657

@tzinckgraf

Description

@tzinckgraf

The Merge function can only take two strings for column names on the merge. It would be great if we can merge across multiple columns.

As a suggestion, maybe something like the pandas merge statement. Below is from the merge statement documentation in pandas:

on: label or list
Column or index level names to join on. These must be found in both DataFrames. If on is None and not merging on indexes then this defaults to the intersection of the columns in both DataFrames.

left_on: label or list, or array-like
Column or index level names to join on in the left DataFrame. Can also be an array or list of arrays of the length of the left DataFrame. These arrays are treated as if they are columns.

right_on: label or list, or array-like
Column or index level names to join on in the right DataFrame. Can also be an array or list of arrays of the length of the right DataFrame. These arrays are treated as if they are columns.

I was not able to find another similar issue. If there is an agreement on the method signatures, I am happy to put together a PR for this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions