MCPcopy Create free account
hub / github.com/apache/arrow / test_partitioned_dataset

Function test_partitioned_dataset

python/pyarrow/tests/parquet/test_dataset.py:1144–1157  ·  view source on GitHub ↗
(tempdir)

Source from the content-addressed store, hash-verified

1142
1143@pytest.mark.pandas
1144def test_partitioned_dataset(tempdir):
1145 # ARROW-3208: Segmentation fault when reading a Parquet partitioned dataset
1146 # to a Parquet file
1147 path = tempdir / "ARROW-3208"
1148 df = pd.DataFrame({
1149 'one': [-1, 10, 2.5, 100, 1000, 1, 29.2],
1150 'two': [-1, 10, 2, 100, 1000, 1, 11],
1151 'three': [0, 0, 0, 0, 0, 0, 0]
1152 })
1153 table = pa.Table.from_pandas(df)
1154 pq.write_to_dataset(table, root_path=str(path),
1155 partition_cols=['one', 'two'])
1156 table = pq.ParquetDataset(path).read()
1157 pq.write_table(table, path / "output.parquet")
1158
1159
1160def test_dataset_read_dictionary(tempdir):

Callers

nothing calls this directly

Calls 2

readMethod · 0.45
write_tableMethod · 0.45

Tested by

no test coverage detected