davanstrien HF Staff Claude Opus 4.5 commited on
Commit
7d6ee37
·
1 Parent(s): 6b53e92

Add finepdfs-stats.py - Polars streaming aggregation demo

Browse files

Computes aggregate statistics on FinePDFs datasets using Polars
streaming without downloading the full dataset.

Features:
- Supports both finepdfs-edu (49.5M rows) and finepdfs (476M rows)
- --lang flag for language+script selection (70+ languages)
- --show-plan to display Polars query optimization
- --limit for quick testing
- Uploads results to HF Hub with auto-generated dataset_info
- Timing summary included in output

Demonstrates polars#25521 which reduced API calls from 139 → 1.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

1 file changed +543
finepdfs-stats.pyAdded+543