Indexed Parquet Dataset
Indexed Parquet Dataset is a high-performance Python library for O(1) random access to massive datasets in Parquet format.
It is specifically optimized for Deep Learning (PyTorch), consumes minimal memory, and supports advanced features such as Schema Evolution (working with files of different schemas in a single dataset).
Key Features
- ⚡ O(1) Random Access: Instantly navigate to any row in a multi-gigabyte dataset without scanning files.
- 🔄 Schema Evolution: Work with datasets where files have different schemas, missing columns, or renamed fields.
- 📦 Lazy Loading: Files are opened only when data is requested. Features an efficient LRU handle cache.
- 🔥 PyTorch Integration: Native support for
torch.utils.data.Dataset, including adaptivecollate_fngeneration. - 🛠️ Fluent API: Method chaining:
shuffle(global or locality-aware),filter,alias,split,limit,rename,cast,map. - 💾 Index Persistence: Save and fast-load the index from a file.
- 🏗️ Materialization: "Bake" all transformations into new Parquet files via
clone().
Architecture
The library remains lightweight, storing only metadata and a row map in RAM:
graph TD
subgraph RAM ["Application (RAM - Lightweight)"]
direction TB
subgraph DS ["IndexedParquetDataset"]
Indices["Indices Array [np.ndarray]<br/>(Shuffled/Filtered indices)"]
Meta["Metadata & Schema<br/>(File offsets, column mapping)"]
Cache["File Handle Cache<br/>(Lazy Loading LRU)"]
end
User["User Code / PyTorch DataLoader"] -- "dataset[idx]" --> Indices
Indices -- "Global Index" --> Meta
Meta -- "Find File & Row Offset" --> Cache
end
subgraph Storage ["Storage (HDD/SSD/S3-over-FUSE)"]
F1["data_part_1.parquet"]
F2["data_part_2.parquet"]
FN["data_part_N.parquet"]
end
Cache -- "Lazy Read" --> F1
Cache -- "Lazy Read" --> F2
Cache -- "Lazy Read" --> FN
F1 -. "O(1) Row Retrieval" .-> User
F2 -. "O(1) Row Retrieval" .-> User
FN -. "O(1) Row Retrieval" .-> User
Installation
From PyPI:
pip install indexed-parquet-dataset
For PyTorch support:
pip install "indexed-parquet-dataset[torch]"
Quickstart
Basic Initialization
from indexed_parquet_dataset import IndexedParquetDataset
# Scans the folder and builds a global row index
ds = IndexedParquetDataset.from_folder("./path/to/data")
print(f"Total rows: {len(ds)}")
print(f"First row: {ds[0]}") # {'id': 1, 'text': '...', ...}
# Random access to any row is instant
sample = ds[999_999]
Transformations (Fluent API)
ds = (IndexedParquetDataset.from_folder("./data")
.filter(lambda x: x["score"] > 0.5)
.shuffle(seed=42, rg_buffer=32) # Locality-aware shuffle for best I/O performance
.alias("text_len", lambda x: len(x["text"]))
.limit(10000))
# Each row now has a virtual 'text_len' column
print(ds[0]["text_len"])
Usage with PyTorch
from torch.utils.data import DataLoader
ds = IndexedParquetDataset.from_folder("./data", auto_fill=True)
train_ds, val_ds = ds.train_test_split(test_size=0.1)
loader = DataLoader(
train_ds,
batch_size=32,
shuffle=True,
num_workers=4,
collate_fn=ds.generate_collate_fn(on_none='fill')
)
Documentation
Full documentation is available on GitHub Pages.
License
Metadata
Release files for indexed-parquet-dataset 0.4.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| indexed_parquet_dataset-0.4.4.tar.gz | 3.0 MB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| indexed_parquet_dataset-0.4.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 3.0 MB
Release files / indexed_parquet_dataset-0.4.4.tar.gz
| Download URL | indexed_parquet_dataset-0.4.4.tar.gz |
|---|---|
| Size | 3.0 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9023777f586a431d75761e11d96e47a44a753c36bedf3b4fd2e7ed71c220bc93
|
|
BLAKE2b-256 checksum How to use checksums |
2dff1c3b1309cba75a5f692275e21020f6207cf2540a9369f459fe766986b966
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 2, 2026.
Transparency logRelease files / indexed_parquet_dataset-0.4.4-py3-none-any.whl
| Download URL | indexed_parquet_dataset-0.4.4-py3-none-any.whl |
|---|---|
| Size | 30.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fea27d680e337c5093a3d06a57152a46e3f35ba0cfc6c1753e0611d91636667b
|
|
BLAKE2b-256 checksum How to use checksums |
3635c6344022c6334735ef80b020c785acf5b8e2184104f0f094b49f8bf28eff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 2, 2026.
Transparency logSecurity for indexed-parquet-dataset 0.4.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for indexed_parquet_dataset-0.4.4.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 2, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.