skillfed

camelot-py

PDF Table Extraction for Humans.

camelot-py v2.0.0 844.5K downloads/30d#4,922 on PyPI3,811
Permissive license MIT Active released

What it is and what it does

This library extracts tables from PDF files into structured data using five parsing strategies: lattice (for ruled tables with visible grid lines), stream and network (for borderless tables using whitespace heuristics), hybrid (combining text alignment), and an optional neural backend using a Table Transformer model for hard borderless cases. It also supports scanned PDFs via optional OCR integration. Every extracted table becomes a pandas DataFrame, ready for analysis or export to multiple formats (CSV, JSON, Excel, HTML, Markdown, SQLite).

The package handles both text-based and image-only PDFs, provides quality metrics (accuracy, whitespace, confidence scores) to filter noise, supports multi-page table continuations, and includes a command-line interface. Default installation requires no system dependencies—the pdfium backend is bundled as a wheel. Optional extras add neural parsing and OCR capabilities. Configuration is extensive, covering table areas, column separators, and text processing.

Use it for:

  • Extract financial tables from annual reports or regulatory filings into DataFrames for analysis.
  • Batch-convert tabular data from scanned PDFs or image-only documents using the optional OCR backend.
  • Automatically recover table structure from borderless PDFs using the neural ml backend when heuristics fail.
  • Build ETL pipelines that read PDF tables, filter by quality metrics, and export to CSV or databases.
  • Parse mixed PDF documents with both ruled and borderless tables using flavor='auto' for automatic parser selection.
  • Stitch multi-page tables across PDF boundaries with stack_contiguous() for continuous data extraction.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Extracts tables from PDFs into pandas DataFrames using multiple parsing strategies (lattice, stream, network, hybrid, and optional neural) and exports them to CSV, JSON, Excel, HTML, Markdown, or SQLite.

Yes. Actively maintained, no known vulnerabilities, installs with low friction (no system dependencies by default), and well-suited for any workflow requiring PDF table extraction into pandas. The multiple parsing strategies and optional neural backend make it flexible for ruled, borderless, and scanned tables. MIT license poses no restrictions.

Install

camelot-py on PyPI

pip

pip install camelot-py

uv

uv add camelot-py

poetry

poetry add camelot-py

Installing camelot-py

Before you install

Low friction: ships as a pure wheel with no system dependencies by default. Active maintenance with recent release 71 days ago and 3811 repository stars. Supports Python 3.10–3.14.

License in practice

MIT license is permissive; you can use, modify, and distribute freely in commercial or private projects with minimal restrictions.

Quickstart

pip install camelot-py

import camelot
tables = camelot.read_pdf('file.pdf')
tables.export('output.csv', f='csv')
df = tables[0].df

Requires Python 3.10 or later. For scanned/image-only PDFs, install optional OCR backend: pip install 'camelot-py[ml,ocr]'.

Verify before relying

  • Accuracy of the optional neural (ml) backend on your specific table types and whether it justifies the PyTorch dependency.
  • Performance characteristics when processing very large PDFs or many tables in batch.
  • Whether the optional ghostscript or poppler backends are available as extras in the current release.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 10 — click, numpy, openpyxl, pandas, tabulate, typing-extensions, opencv-python-headless, pypdfium2, pillow, playa-pdf
Maintenance actively maintained — 71 days since the last release
Last repo commit
First released
Downloads 844,528/month — #4,922 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: camelot_py-2.0.0-py3-none-any.whl

Development Status :: 5 - Production/StableProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14

Tags

pdf table extractionextract tables from pdfpdf to dataframepdf table parserconvert pdf tables to csvborderless table detectionscanned pdf ocr extraction
pdf-extractiondata-pipelinetable-parsing

More Text Processing packages