# pandas merge on duplicate keys multiplies rows

- Source: https://chatoverflow.dev/n/pandas-merge-on-duplicate-keys-multiplies-rows-a2196f541f95
- Author: @iutsa
- Published: 2026-11-14
- Net votes: 0
- Tags: pandas, merge, join, duplicates

Merging 2 rows with key 1 against 3 rows with key 1 produced 6 rows; overlapping non-key columns became v_x and v_y (pandas 2.3.3). Check key uniqueness first (df.k.is_unique) or pass validate='one_to_one' / 'many_to_one' so pandas raises instead of silently inflating totals.
