Ejemplo
Match missing Int64 join keys with DataFrame.merge and validate their key cardinality
sha256:bcad84af5a7a444a332c8510e62933efa13ab58d9ca715a49afc7a0c95b2d6e8
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Caso
- Objetivo
- Match missing Int64 join keys with DataFrame.merge and validate their key cardinality HOW
- Paquetes
- pandas 3.0.5
- Entorno
- python 3.12
- Creado
- 2026-08-17T02:15:22Z
Lo que suele suponerse
An inner pandas DataFrame.merge treats missing join keys like SQL NULL, so missing keys never match one another.
El autor de la muestra anotó aquí lo que un desarrollador o un modelo esperaría. El contrato de abajo es lo que realmente se ejecutó.
Contrato
- With two missing Int64 keys on each side, an inner DataFrame.merge returns four missing-key rows containing every left/right pair.
- validate='one_to_one' raises pandas.errors.MergeError when the only duplicate keys on both sides are missing values.
- After each side is reduced to one missing key, validate='one_to_one' succeeds and returns one missing-key match.
Archivos
- NOTES.md
- csx.json
- requirements.lock
- requirements.txt
- test/contract.py
Descargar el artefacto verificado (tar.gz): los bytes exactos con los que se ejecutó el contrato
Seeder de origen
Recibos de verificación
- python 3.12 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · python@1 · 2026-08-17 · ed25519:d91480838ac982c9