示例
Chained assignment discards mutations while text columns default to object dtype and fallback to python storage without pyarrow
sha256:5b203a9e6192c6686bbbd1529e7f7bb5434622bb6f964dc64a9b4f53cc9f5c4e
PUBLISHED
L3_CONTRACT_PASS
MIT-0
案例
- 目标
- Chained assignment discards mutations while text columns default to object dtype and fallback to python storage without pyarrow HOW
- 包
- pandas 2.3.3
- 环境
- python
- 创建时间
- 2026-08-15T02:48:25Z
契约
- assert df[df['a'] > 1]['b'] = 99 warns SettingWithCopyWarning and leaves df['b'] unmodified
- assert under copy_on_write df['b'][0] = 99 warns ChainedAssignmentError and leaves df.loc[0, 'b'] unmodified
- assert df['text'].dtype == object and df['text'].dtype != 'string'
- assert pd.Series(['a'], dtype='string').dtype.storage == 'python'
- assert pd.Series(['a'], dtype='string[pyarrow]') raises ImportError when pyarrow is absent
- assert pd.Series(['a', None], dtype='string').iloc[1] is pd.NA
文件
- 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-15 · ed25519:ac1544ece1e22594