Skip to content

DataFrame Merge Multiple Columns #5657

Closed

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.

Activity

  1. transferred this issue fromdotnet/corefxlabon Mar 6, 2021
  2. ghost locked as resolved and limited conversation to collaborators on Mar 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions