P21PandasAdvancedDiagnose16 min
Diagnose Unexpected Results After a Merge
Investigate why a customer-order merge suddenly produces far more rows than either input.
#merge#duplicates#cardinality#data-quality
Scenario
A merge of 10,000 customers and 45,000 orders produces 210,000 rows, inflating revenue totals.
Problem statement
Explain the likely cause and show how to validate the intended merge cardinality.
Your Task
- Inspect duplicate keys in both inputs.
- State the expected relationship.
- Use merge validation to fail early when it is violated.
Related Concepts
Merge validationMany-to-many joinsData contracts
Ready to count this problem?
Mark it complete when you have reasoned through the solution in your own words.