Loading tsb…

← tsb playground

ORC Format I/O

pandas.read_orc DataFrame.to_orc

Apache ORC (Optimized Row Columnar) is a self-describing, type-aware columnar file format designed for large-scale analytical workloads. tsb supports reading and writing ORC files with NONE compression using RLE v1 integer encoding, direct float/double, and direct string encoding.

ℹ️ This playground runs entirely in-browser via a bundled tsb build. ORC buffers are created in-memory — no file system access is required.

1 — Write & read a DataFrame

Create a DataFrame, serialize it to ORC bytes, then parse it back:

TypeScript
Click ▶ Run to execute
Ctrl+Enter to run · Tab to indent

2 — Nullable columns

ORC natively supports null values via PRESENT streams:

TypeScript
Click ▶ Run to execute
Ctrl+Enter to run · Tab to indent

3 — Column selection

Use the columns option to read only a subset of columns:

TypeScript
Click ▶ Run to execute
Ctrl+Enter to run · Tab to indent

4 — Large dataset benchmark

Serialize and parse a 10 000-row DataFrame to measure throughput:

TypeScript
Click ▶ Run to execute
Ctrl+Enter to run · Tab to indent