babypandas-dev / babypandas

Pandas data-analysis library with a restricted API
MIT License
8 stars 7 forks source link

Allow for merging on multiple columns explicitly #28

Open surajrampure opened 1 year ago

surajrampure commented 1 year ago

Right now, left_on and right_on must be strings referring to individual columns. The only way to merge on multiple columns is if the sets of columns share the same names and we don't specify which columns to merge on, in which case it happens automatically. But I want to be able to say

df1.merge(df2, left_on=['A', 'B'], right_on=['C', 'D'])