How do you check that a merge worked correctly?
intermediateAnswer
Three things, in order.
Row count — compare len() before and after. A left merge should not change it; if it grew, the right side has duplicate keys.
Match rate — indicator=True adds a _merge column, and value_counts() on it shows how many rows matched, and how many came from one side only.
Assert the relationship — validate='many_to_one' raises immediately if the keys are not what you assumed, turning a silent data-quality bug into an error at the point it happens.
Related