supposed data set,
df1
num1 num2
27 1
973 3
1410 3
724 1
346 5
df2
a1 a2 c1 c2
27.0 1 red apple
131.0 1 blue banana
2124.0 3 green apple
1345.0 1 red orange
346.0 5 blue grape
I want to compare num1 - a1 & num2 - a2, If both conditions are the same, I want to add the values in c1 and c2 to the list.(assume the beginning is an empty list)
condition
As you see, num1-a1, num2&a2 `s shape is different.
Only the values added to the list are 'c1' and 'c2'
(num1, num2, a1, a2 are just using to compare & match)
The order is jumbled, and the dataframes are different sizes. (different column length)
The Output what I want
above example, 2 matches, (27-1 , 346-5), so
mylist = [red, apple, blue, grape]
How can I do this?
Thank you for reading.
'blue', 'banana'is also matched.