I am trying to merge/join 2 tables in pandas on the basis of a key, but some of which do not exist in the 2nd table . The 2 tables look somewhat like this:
ID ATTR1 ATTR2
A1 2000 30
A2 300 12
A3 45 22
ID ATT12SUMCOND
A1 2030
A2 312
Now the key value A3 does not exist in the second table, still I need to join these 2 tables somewhat like:
ID ATTR1 ATTR2 ATTR12COND
A1 2000 30 2030
A2 300 12 312
A3 45 22 0
How do I achieve this?