tabula-py

Extract tables from PDF files directly into pandas DataFrames.

Library
PyPI
v2.10.0
2,315stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
50/100Fair
Development Activity0
Maintenance32
Community68
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
79/100Good
Architecture74
Code Quality80
Innovation72
Learning Curve88

tabula-py is a simple Python wrapper around tabula-java that reads tables embedded in PDF documents and turns them into pandas DataFrames. It bridges the Java-based Tabula extraction engine and the Python data-science ecosystem, so you can pull tabular data out of reports, invoices, statements, and scientific papers without manual copy-paste.

Beyond DataFrame conversion, tabula-py can write extracted tables straight to CSV, TSV, or JSON files, handle multi-page and remote PDFs, and apply lattice or stream extraction modes for different table layouts. It requires a Java 8+ runtime and integrates cleanly into notebooks and data pipelines.

What You Get

  • read_pdf() to extract one or many tables from a PDF into pandas DataFrames
  • Export helpers that convert PDF tables directly to CSV, TSV, or JSON files
  • Support for multi-page documents, page ranges, and remote PDF URLs
  • Lattice and stream extraction modes plus area/column tuning for tricky layouts
  • Optional jpype-backed execution for faster repeated extraction

Common Use Cases

  • Turning tabular data locked inside PDF reports into analysis-ready DataFrames
  • Batch-converting collections of PDFs into CSV or JSON datasets
  • Extracting financial, scientific, or government-report tables in notebooks
  • Feeding PDF-sourced tables into ETL and data-cleaning pipelines

Under The Hood

Architecture — tabula-py is a thin, well-typed Python layer over the tabula-java JAR. The core read_pdf function builds a command invocation (or, with the jpype extra, an in-process JVM call) against tabula-java, passing options such as pages, area, columns, and lattice/stream mode, then parses the returned JSON/CSV output into pandas DataFrames. Conversion helpers reuse the same bridge to write CSV/TSV/JSON directly.

Tech Stack — Pure Python (3.9+) depending on pandas and numpy, bridging to tabula-java which requires a Java 8+ runtime. An optional jpype extra enables faster in-process JVM calls instead of subprocess invocation. Packaging and docs are handled via standard Python tooling and Read the Docs.

Code Quality — The project is mature (2,300+ stars, 450+ commits, 37 releases) with continuous-integration tests via GitHub Actions, hosted documentation with an extensive FAQ, and example notebooks runnable on Google Colab. The API surface is deliberately small and stable.

API Design — The developer experience centers on one obvious entrypoint, tabula.read_pdf(...), whose keyword arguments map onto tabula-java’s options. Returning standard pandas DataFrames means the output drops immediately into existing data workflows, and the documented FAQ covers the common Java/runtime pitfalls.

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search