A list of the Dataset source fragments or pieces with absolute file paths. Examples -------- Generate an example dataset: >>> import pyarrow as pa >>> table = pa.table({'year': [2020, 2022, 2021, 2022, 2019, 2021], ...
(self)
| 1675 | |
| 1676 | @property |
| 1677 | def fragments(self): |
| 1678 | """ |
| 1679 | A list of the Dataset source fragments or pieces with absolute |
| 1680 | file paths. |
| 1681 | |
| 1682 | Examples |
| 1683 | -------- |
| 1684 | Generate an example dataset: |
| 1685 | |
| 1686 | >>> import pyarrow as pa |
| 1687 | >>> table = pa.table({'year': [2020, 2022, 2021, 2022, 2019, 2021], |
| 1688 | ... 'n_legs': [2, 2, 4, 4, 5, 100], |
| 1689 | ... 'animal': ["Flamingo", "Parrot", "Dog", "Horse", |
| 1690 | ... "Brittle stars", "Centipede"]}) |
| 1691 | >>> import pyarrow.parquet as pq |
| 1692 | >>> pq.write_to_dataset(table, root_path='dataset_v2_fragments', |
| 1693 | ... partition_cols=['year']) |
| 1694 | >>> dataset = pq.ParquetDataset('dataset_v2_fragments/') |
| 1695 | |
| 1696 | List the fragments: |
| 1697 | |
| 1698 | >>> dataset.fragments |
| 1699 | [<pyarrow.dataset.ParquetFileFragment path=dataset_v2_fragments/... |
| 1700 | """ |
| 1701 | return list(self._dataset.get_fragments()) |
| 1702 | |
| 1703 | @property |
| 1704 | def files(self): |