Does pandas (or another module) have any functions to support merge (or join) two tables based on multiple keys?
For example, I have two tables (DataFrames) a
and b
:
>>> a
A B value1
1 1 23
1 2 34
2 1 2342
2 2 333
>>> b
A B value2
1 1 0.10
1 2 0.20
2 1 0.13
2 2 0.33
The desired result is:
A B value1 value2
1 1 23 0.10
1 2 34 0.20
2 1 2342 0.13
2 2 333 0.33