View Parquet with Python
Run this Python script locally with Apache Arrow. The script reads your local file rather than sending it to this website.
Before you start
- Install Python 3 and create an isolated environment using the commands below.
- Work in a folder containing input.parquet. Change the filenames to your own paths and use a new output name to avoid overwriting a file.
- Save the Python code as task.py. On macOS/Linux run .venv/bin/python task.py; on Windows PowerShell run .venv\Scripts\python.exe task.py.
python3 -m venv .venv
.venv/bin/python -m pip install pyarrowpy -m venv .venv
.venv\Scripts\python.exe -m pip install pyarrowimport pyarrow.parquet as pq
source = pq.ParquetFile("input.parquet")
print(source.schema_arrow)
print("Rows:", source.metadata.num_rows)
batch = next(source.iter_batches(batch_size=10), None)
print([] if batch is None else batch.to_pylist())Limits and output
- This prints the schema and at most ten rows. It does not modify the file or export the complete table.
- A row preview is not a complete data-quality check. Compressed pages, wide values and nested columns can still require substantial memory.
Documentation: Apache Arrow Parquet documentation