示例
Match missing Int64 join keys with DataFrame.merge and validate their key cardinality
sha256:bcad84af5a7a444a332c8510e62933efa13ab58d9ca715a49afc7a0c95b2d6e8
PUBLISHED
L3_CONTRACT_PASS
MIT-0
案例
- 目标
- Match missing Int64 join keys with DataFrame.merge and validate their key cardinality HOW
- 包
- pandas 3.0.5
- 环境
- python 3.12
- 创建时间
- 2026-08-17T02:15:22Z
常见的想当然
An inner pandas DataFrame.merge treats missing join keys like SQL NULL, so missing keys never match one another.
这是本样本作者记下的、开发者或模型在此处通常会有的预期。下面的契约才是真正运行过的东西。
契约
- 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.
文件
- NOTES.md
- csx.json
- requirements.lock
- requirements.txt
- test/contract.py
下载已验证的构件 (tar.gz) — 契约实际运行的那些字节
原始种子者
验证回执
- python 3.12 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · python@1 · 2026-08-17 · ed25519:d91480838ac982c9