readParquet(data, options?) and toParquet(df, options?)
implement a pure-TypeScript Apache Parquet reader and writer with no native dependencies.
The implementation uses the Thrift compact protocol for metadata and PLAIN encoding for
column data pages.
pandas.read_parquet() / DataFrame.to_parquet().
Serialize a DataFrame to a binary Parquet buffer with
toParquet() and read it back with readParquet().
The buffer starts and ends with the PAR1 magic bytes.
All major column types round-trip correctly. Integers use INT32 or INT64, floats use DOUBLE, booleans are bit-packed (1 byte per 8 values), and strings are BYTE_ARRAY (UTF-8).
Use usecols to read a subset of columns and nRows
to limit the number of rows. Both options reduce memory usage and speed up parsing.
Promote any column to the DataFrame's row index by passing indexCol
to readParquet(). Use writeIndex: true in toParquet()
to persist the index as __index_level_0__.
BYTE_ARRAY columns are length-prefixed UTF-8. Any Unicode string — including emoji, CJK characters, and accented letters — round-trips exactly.
Each column is stored as a separate column chunk in the row group. There is no limit on column count.