Skip to content
Prev 361636 / 398506 Next

Merging two data frame with different lengths

So I have two data frames.

The first one is a reccomendation data frame and the second is a melted
list with a pairing of OpportunityId's and ProductId's. There are multiple
product id's per an opportunty id. What I want to do is merge based on
ProductId so that I can add the OpportunityId to the reccomendation data
frame.
1 01t30000001ik30AAA 01ta0000005SivAAAS 01ta0000005RQimAAG
2 01t30000001ik3vAAA 01t30000001ik5bAAA 01t30000001ikKPAAY>
head(pd_melt[,1:3],2)          OpportunityId          ProductId value
4826 0063000000bqUKlAAM 01t30000001ik3vAAA     0
9651 0063000000bqUKlAAM 01t30000001ik41AAA     0





Any suggestions?