示例
pyarrow 25.0.1: PyArrow StringScalar equality with str literals returns False and null scalars evaluate truthy, while to_pandas degrades text columns to object dtype unless pandas metadata or ArrowDtype is present and distinct string types reject concatenation
已验证示例 — pypi pyarrow 25.0.1: PyArrow StringScalar equality with str literals returns False and null scalars evaluate truthy, while to_pandas degrades text…
sha256:9edb237c0ecdc2c2ff1db0a48f82ff6121180f6f5beada8304796b12985ce100
本网络只提供一件事:能构建的样本。它在沙箱中运行并保留签名回执。它不评级、不担保——同样的代码能否在你的环境构建,它没有测量过。
提交了通过的契约回执的不同签名密钥数量。为 1 表示只有作者;大于 1 表示还有其他人构建过。密钥是自行生成的,背后没有注册身份,因此计的是密钥而非人。
MIT-0
执行证据
声明的环境与签名的运行分开呈现,你可以看到这个样本究竟运行了什么、在哪里运行。
- 证据依据
- 签名契约通过
- 验证回执
- 2
- 构建过它的签名密钥
- 1
声明的环境
python linux x64 python python pip
验证运行环境
| 环境 | 契约 | 阶段 | 运行日期 |
|---|---|---|---|
| python 3.12 · linux alpine/x64 · docker ed25519:ac1544ece1e22594 | PASS | compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS CONTAINER_RUN · python@1 |
2026-08-15 |
| python 3.12 · linux alpine/x64 · docker ed25519:d91480838ac982c9 | SKIPPED | compile:SKIPPED · contract:SKIPPED · load:SKIPPED · resolve:FAIL CONTAINER_RUN · python@1 |
2026-08-18 |
案例
HOW- 目标
- PyArrow StringScalar equality with str literals returns False and null scalars evaluate truthy, while to_pandas degrades text columns to object dtype unless pandas metadata or ArrowDtype is present and distinct string types reject concatenation
- 符号
-
- pyarrow.array
- pyarrow.scalar
- pyarrow.StringScalar
- pyarrow.string
- pyarrow.large_string
- pyarrow.string_view
- pyarrow.concat_arrays
- pyarrow.Table.from_pydict
- pyarrow.Table.from_pandas
- pyarrow.Table.to_pandas
- pyarrow.Array.to_numpy
- pyarrow.Array.to_pylist
- 环境
- python
- 创建时间
- 2026-08-15T04:27:08Z
契约
- assert isinstance(arr[0], pa.StringScalar) and (arr[0] == 'hello') is False
- assert bool(pa.scalar('', type=pa.string())) is True and bool(pa.scalar(None, type=pa.string())) is True
- assert arr.to_numpy() raises ArrowInvalid and arr.to_numpy(zero_copy_only=False).dtype == object
- assert pa.Table.from_pydict({'text': ['a']}).to_pandas()['text'].dtype == object
- assert table.replace_schema_metadata(None).to_pandas()['text'].dtype == object and table.to_pandas(types_mapper=pd.ArrowDtype)['text'].dtype.kind == 'U'
- assert pa.concat_arrays([arr_utf8, arr_large]) raises ArrowInvalid until explicitly cast
文件
- csx.json
- requirements.lock
- requirements.txt
- test/contract.py