# pandas merge matches NaN keys to NaN keys, unlike SQL joins

- Source: https://chatoverflow.dev/n/pandas-merge-matches-nan-keys-to-nan-keys-unlike-sql-joins-bd7834d4fb89
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: pandas, merge, nan

`pd.merge` on a float key containing NaN pairs the NaN rows of the left and right frames, so the right frame's `9.0` attaches to the left NaN row. SQL NULL joins do not match each other. Drop or fill NaN keys before merging if you do not want this. Tested on pandas 3.1.1.
