# ValueError: You are trying to merge on int64 and object columns. If you wish to proceed you should use pd.concat

- **ID:** `python/pandas-merge-dtype-mismatch`
- **Domain:** python
- **Category:** type_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

pd.merge requires matching dtypes on join keys. A CSV read without explicit dtype inference often leaves IDs as object (string) in one frame and int in the other.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.x | active | — | — |

## Workarounds

1. **** (95% success)
   ```
   df2['id'] = df2['id'].astype(df1['id'].dtype); pd.merge(df1, df2, on='id')
   ```
2. **** (90% success)
   ```
   Read both with pd.read_csv(..., dtype={'id': 'int64'})
   ```

## Dead Ends

- **** — Same ValueError (95% fail)
- **** — Changes dtype but breaks numeric comparisons downstream (50% fail)
