Skip to main content

tabula-py

Build Status PyPI version Documentation Status PyPI - Downloads

tabula-py is a simple Python wrapper of tabula-java, which can read tables in a PDF. You can read tables from a PDF and convert them into a pandas DataFrame. tabula-py also enables you to convert a PDF file into a CSV, a TSV or a JSON file.

You can see the example notebook and try it on Google Colab, or we highly recommend reading our documentation, especially the FAQ section.

tabula-py example

Requirements

  • Java 8+
  • Python 3.8+

OS

I confirmed working on macOS and Ubuntu. But some people confirm it works on Windows 10. See also the documentation for the detailed installation for Windows 10.

Usage

Install

Ensure you have a Java runtime and set the PATH for it.

pip install tabula-py

If you want to leverage faster execution with jpype, install with jpype extra.

pip install tabula-py[jpype]

Example

tabula-py enables you to extract tables from a PDF into a DataFrame, or a JSON. It can also extract tables from a PDF and save the file as a CSV, a TSV, or a JSON.  

import tabula

# Read pdf into list of DataFrame
dfs = tabula.read_pdf("test.pdf", pages='all')

# Read remote pdf into list of DataFrame
dfs2 = tabula.read_pdf("https://github.com/tabulapdf/tabula-java/raw/master/src/test/resources/technology/tabula/arabic.pdf")

# convert PDF into CSV file
tabula.convert_into("test.pdf", "output.csv", output_format="csv", pages='all')

# convert all PDFs in a directory
tabula.convert_into_by_batch("input_directory", output_format='csv', pages='all')

See an example notebook for more details. I also recommend reading the tutorial article written by @aegis4048, and another tutorial written by @tdpetrou.

Contributing

Interested in helping out? I'd love to have your help!

You can help by:

  • Reporting a bug.
  • Adding or editing documentation.
  • Contributing code via a Pull Request. See also for the contribution
  • Write a blog post or spread the word about tabula-py to people who might be able to benefit from using it.

Contributors

Another support

You can also support our continued work on tabula-py with a donation on GitHub Sponsors or Patreon.

Metadata

Release files for tabula-py 2.10.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tabula-py 2.10.0
File Size Uploaded
tabula_py-2.10.0.tar.gz 12.5 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for tabula-py 2.10.0
File Interpreter ABI Platform
tabula_py-2.10.0-py3-none-any.whl Python 3 none any Details

Total release size: 24.5 MB

Release files / tabula_py-2.10.0.tar.gz

Download URL tabula_py-2.10.0.tar.gz
Size 12.5 MB
Tags Source
SHA-256 checksum
How to use checksums
75968a83fe978e5d56ccf23f0f0255a459c256b7b52db7cabe5ac795bb3b12df
BLAKE2b-256 checksum
How to use checksums
e2312a14a5048f681c404ae0b32a00d141128dd3065965190fdcae3b33e2bcae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

Release files / tabula_py-2.10.0-py3-none-any.whl

Download URL tabula_py-2.10.0-py3-none-any.whl
Size 12.0 MB
Tags Python 3
SHA-256 checksum
How to use checksums
c7596c559fc813e313eb4fbc7aabe7e4290dbd04717c4cbe4aa4a2cafd00ab63
BLAKE2b-256 checksum
How to use checksums
2f8010bc6f303054d1a06eb8628f90e5997f4b1272956a477230f3fa95637c28
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.7

Release history Release notifications | RSS feed

This release

2.10.0 This release

2 release files

2.9.3

2 release files

2.9.2

2 release files

2.9.1

2 release files

2.9.0

2 release files

2.8.2

2 release files

2.8.1

2 release files

2.8.0

2 release files

2.7.0

2 release files

2.6.0

2 release files

2.5.1

2 release files

2.5.0

2 release files

2.4.0

2 release files

2.3.1

2 release files

2.3.0

2 release files

2.2.0

2 release files

2.1.1

2 release files

2.1.0

2 release files

2.0.4

2 release files

2.0.3

2 release files

2.0.2

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.4.3

2 release files

1.4.2

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.3.1

3 release files

1.3.0

1 release file

1.2.0

1 release file

1.1.1

2 release files

1.1.0

1 release file

1.0.1

1 release file

1.0.0

1 release file

0.9.0

1 release file

0.8.0

1 release file

0.7.1

1 release file

0.7.0

1 release file

0.6.1

1 release file

0.6.0

1 release file

0.5.0

1 release file

0.4.1

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.2

2 release files

0.2.1

3 release files

0.2.0

2 release files

0.1.1

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page