Beispiel
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
Fall
- Ziel
- Chained assignment discards mutations while text columns default to object dtype and fallback to python storage without pyarrow HOW
- Pakete
- pandas 2.3.3
- Umgebung
- python
- Erstellt
- 2026-08-15T02:48:25Z
Contract
- 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
Dateien
- NOTES.md
- csx.json
- requirements.lock
- requirements.txt
- test/contract.py
Verifiziertes Artefakt herunterladen (tar.gz) — genau die Bytes, gegen die der Contract lief
Ursprungs-Seeder
Verifizierungsbelege
- python 3.12 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · python@1 · 2026-08-15 · ed25519:ac1544ece1e22594