ModernCalcs

Parquet to CSV Converter

Upload a Parquet file to validate it and generate Python conversion code.

Browser limitation: Parquet is a binary columnar format requiring a native decoder. This tool validates your file and generates Python + pyarrow code to convert locally.

Drop a .parquet file here or click to browse

Parquet to CSV: Extract Data from Columnar Files for Spreadsheets and ETL

Parquet is efficient for analytics but opaque for ad-hoc inspection — you can't open it in Excel or send it to a stakeholder as-is. Converting to CSV makes the data universally accessible. This tool validates your Parquet file and generates Python + pyarrow code with options for column selection and chunked reading of files too large to fit in memory.

Formula
Full file: df = pd.read_parquet("file.parquet") df.to_csv("output.csv", index=False) Column selection (3 of 50 columns): df = pd.read_parquet("file.parquet", columns=["id", "name", "revenue"]) Chunked (large files, row-group streaming): pf = pq.ParquetFile("file.parquet") for i, batch in enumerate(pf.iter_batches(batch_size=100_000)): df = batch.to_pandas() df.to_csv("out.csv", mode="a" if i > 0 else "w", header=(i == 0), index=False)

Column selection is pushed down to the Parquet reader — only the selected column chunks are read from disk, not the full file. Chunked mode reads one row group at a time to keep memory usage constant.

When to Convert Parquet to CSV

Parquet → CSV conversion is common in data engineering for: sharing query results with stakeholders who use Excel. Ingesting data into systems that only accept CSV (legacy databases, some SaaS tools). Debugging a data pipeline output. One-off exports from a data lakehouse. Note: if you'll be querying the data again, keep the Parquet file — CSV is 3-10x larger and much slower to query.

Column Selection for Performance

One of Parquet's core advantages is column pruning: when you specify columns=['id', 'revenue'] in pd.read_parquet(), pyarrow reads only those column chunks from disk. On a 100-column, 10GB file querying 3 columns, you read roughly 300MB instead of 10GB. This makes column-selective extraction from Parquet dramatically faster than from CSV, where every byte must be read to find the columns you want.

Chunked Reading for Large Files

pyarrow.ParquetFile.iter_batches() reads row groups one at a time without loading the entire file into memory. Each batch is a pyarrow RecordBatch that converts to a pandas DataFrame. By writing each batch to CSV in append mode (mode='a', header=False after the first batch), you can convert arbitrarily large Parquet files on machines with limited RAM. A typical row group is 128MB of compressed data, expanding to 500MB-2GB uncompressed.

Generated Code Options

  • Full read → CSV (default)
  • Column selection → reads only specified columns
  • Chunk mode → streams row groups, constant memory
  • First chunk writes header; subsequent chunks append
  • Snappy/Zstd compressed files read transparently

Frequently Asked Questions

Why can't this convert directly in the browser?

Parquet is a binary columnar format with Thrift-encoded metadata and compressed column data. Decoding it requires a native Parquet library. This tool validates your file's magic bytes and generates Python + pyarrow code that you can run locally.

What Python packages do I need?

pip install pandas pyarrow. Both are needed: pyarrow reads the Parquet format, pandas converts to CSV. Run pip install pandas pyarrow then python parquet_to_csv.py.

How do I convert only specific columns?

Enter column names in the 'Select Columns' field, separated by commas. The generated code uses the columns= parameter in pd.read_parquet(), which tells pyarrow to read only those column chunks from the file — this is much faster than reading all columns and discarding the rest for large files.

How do I handle large Parquet files that don't fit in memory?

Set a Chunk Size (e.g., 100000 rows per chunk). The generated code uses pyarrow's iter_batches() to read row groups in batches and write CSV incrementally. The first chunk writes the header; subsequent chunks append. This lets you convert files larger than available RAM.

What happens to Parquet type information in the CSV?

CSV stores everything as strings, so type information is lost. Timestamps become ISO strings, integers become numeric strings, booleans become True/False (Python repr). If you need to reload the CSV later, use dtype= and parse_dates= in pd.read_csv() to restore types, or store the original Parquet schema for reference.