finds.dev← search

// the find

atlanhq/camelot

★ 3,716 · Python · NOASSERTION · updated Jan 2023

Camelot: PDF Table Extraction for Humans

Camelot extracts tables from text-based PDFs into pandas DataFrames using two strategies: lattice (grid lines) and stream (whitespace-delimited). It's aimed at data analysts and engineers who regularly wrestle with government reports, financial disclosures, or research papers in PDF form and need something more controllable than Tabula.

The two-parser approach is genuinely useful — lattice works well for PDFs with visible borders, stream handles whitespace-only layouts, and you can tune both extensively with parameters like edge_tol and column_separators rather than accepting whatever the parser guesses. The accuracy/whitespace metrics on each extracted table let you filter bad results programmatically without opening every PDF. It exports directly to pandas DataFrame, CSV, JSON, Excel, HTML, or SQLite, covering most downstream use cases. The benchmark suite against Tabula, pdfplumber, and pdftables is unusually thorough for a library this size — real PDFs, not toy examples.

Dead project: last commit was January 2023, Travis CI (not GitHub Actions), and setup.py instead of pyproject.toml. The ghostscript dependency for the lattice parser is a pain on any non-Linux environment — it's not a Python package, requires a system install, and breaks silently if the version is wrong. No support for scanned PDFs at all — it explicitly defers that to a different tool, which is a hard blocker for a large share of real-world PDFs. The stream parser essentially guesses column boundaries from text positions and gets confused easily by multi-line cells, merged headers, or non-uniform spacing, requiring manual column_separators tuning that doesn't transfer between documents.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →