Merge and Join in Python

From the Pandas cheat sheet ยท Combine Data ยท verified Aug 2026

Merge and Join

Combine tables using matching key columns.

python
result = orders.merge(customers, on="customer_id", how="left")
๐Ÿ“Œ Choose join type based on required rows
๐Ÿ’ก validate catches unexpected key cardinality
๐Ÿ” indicator shows where each row matched
โš ๏ธ Duplicate keys can multiply rows
mergejoinkeys

Continue with Pandas

Save the full cheat sheet or work through every related task.

More Python tasks

Back to the full Pandas cheat sheet