Reference library

Files & data

Read and write files safely; parse JSON, CSV, and common text formats.

1 match
Files & data medium

Read Parquet-Like Columnar CSV Chunks in Python

A Python generator that reads a CSV file column-by-column, yielding dictionary chunks where each key points to a list of values—mirroring how Parquet stores data columnar.

csv columnar generator
Python
```python
import csv
from pathlib import Path
from typing import Iterator, List

def read_parquet_like_columnar(csv_path: str, column_names: List[str], chunk_size: int = 2) -> Iterator[dict]:
    """Read CSV data in columnar chunks, similar to how parquet stores columns."""
    csv_file = Path(csv_path)
    with csv_f…
13 0 Open

Browse by section

Each section groups closely related Python snippets.

Files & data — Python code examples

What you will find here

This page collects files & data snippets — short, copy-ready Python you can paste into our free online IDE and run without installing anything. Each sample includes a plain-English explanation and the full source code.

Samples vs tutorials and challenges

Samples are quick reference — one concept per page. For step-by-step teaching, use our Python tutorials. To test yourself, try quizzes or coding challenges. Clean up style with the Python formatter.