--- id: camelot-py version: "2.0.0" license: MIT license_treatment: permissive maintenance: active --- # camelot-py — PDF Table Extraction for Humans. License: permissive · Maintenance: active · Downloads: 844.5K/mo ## 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 above — 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 pip install camelot-py uv add camelot-py 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_current - Install friction: low - Maintenance: active - Downloads: 844.5K/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags pdf table extraction, extract tables from pdf, pdf to dataframe, pdf table parser, convert pdf tables to csv, borderless table detection, scanned pdf ocr extraction, pdf-extraction, data-pipeline, table-parsing [View on SkillFed](https://skillfed.io/packages/camelot-py) · [View on PyPI](https://pypi.org/project/camelot-py/)