camelot-py
PDF Table Extraction for Humans.
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-pyuv
uv add camelot-pypoetry
poetry add camelot-pyInstalling 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
Tags
More Text Processing packages
A drop-in replacement for Python's standard…
permissive · top 100 on PyPI
pyparsingpyparsing provides a library for building text…
permissive · top 1,000 on PyPI
docutilsDocutils converts plaintext documentation in…
unclear · top 1,000 on PyPI
RapidFuzzRapidFuzz provides fast fuzzy string matching…
permissive · top 1,000 on PyPI
tinycss2tinycss2 parses CSS strings into token and…
permissive · top 1,000 on PyPI
llama-parseLlamaParse parses complex documents (PDFs,…
permissive · top 1,000 on PyPI
tabula-pyExtracts tables from PDF files and converts…
permissive · top 5,000 on PyPI
img2tableIdentifies and extracts tables from images and…
permissive · top 15,000 on PyPI
pymupdfPyMuPDF extracts, renders, converts, and…
agpl · top 1,000 on PyPI
pdftextExtracts plain text or structured blocks,…
permissive · top 15,000 on PyPI
pdfplumberExtract detailed information about text…
permissive · top 1,000 on PyPI
opendataloader-pdfExtracts structured data (Markdown, JSON, HTML)…
permissive · top 15,000 on PyPI
pdf-oxideExtracts text, images, and metadata from PDFs…
permissive · top 15,000 on PyPI
pantabConverts DataFrames to and from Tableau Hyper…
permissive · top 15,000 on PyPI
html-table-parser-python3Parses HTML tables into nested lists of rows…
agpl · top 15,000 on PyPI
fpdf2fpdf2 generates PDF documents programmatically…
copyleft · top 5,000 on PyPI