tabula-py


Nametabula-py JSON
Version 2.8.2 PyPI version JSON
download
home_page
SummarySimple wrapper for tabula-java, read tables from PDF into DataFrame
upload_time2023-09-22 23:04:48
maintainer
docs_urlNone
author
requires_python>=3.8
licenseThe MIT License (MIT) Copyright (c) 2016 Michiaki Ariga Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords data frame pdf table
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # tabula-py

[![Build Status](https://github.com/chezou/tabula-py/actions/workflows/pythontest.yml/badge.svg)](https://github.com/chezou/tabula-py/actions/workflows/pythontest.yml)
[![PyPI version](https://badge.fury.io/py/tabula-py.svg)](https://badge.fury.io/py/tabula-py)
[![Documentation Status](https://readthedocs.org/projects/tabula-py/badge/?version=latest)](https://tabula-py.readthedocs.io/en/latest/?badge=latest)
[![Patreon](https://img.shields.io/badge/patreon-donate-orange.svg)](https://www.patreon.com/chezou)

`tabula-py` is a simple Python wrapper of [tabula-java](https://github.com/tabulapdf/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](https://nbviewer.jupyter.org/github/chezou/tabula-py/blob/master/examples/tabula_example.ipynb) and try it on Google Colab, or we highly recommend reading [our documentation](https://tabula-py.readthedocs.io/en/latest/), especially the FAQ section.

![tabula-py example](https://github.com/chezou/tabula-py/raw/master/example.png)

## 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](https://tabula-py.readthedocs.io/en/latest/getting_started.html#get-tabula-py-working-windows-10).

## Usage

- [Documentation](https://tabula-py.readthedocs.io/en/latest/)
  - [FAQ](https://tabula-py.readthedocs.io/en/latest/faq.html) would be helpful if you have an issue
- [Example notebook on Google Colaboratory](https://colab.research.google.com/github/chezou/tabula-py/blob/master/examples/tabula_example.ipynb)

### Install

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

```bash
pip install tabula-py
```

### 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.  

```py
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](https://nbviewer.jupyter.org/github/chezou/tabula-py/blob/master/examples/tabula_example.ipynb) for more details. I also recommend reading [the tutorial article](https://aegis4048.github.io/parse-pdf-files-while-retaining-structure-with-tabula-py) written by [@aegis4048](https://github.com/aegis4048), and [another tutorial](https://www.dunderdata.com/blog/read-trapped-tables-within-pdfs-as-pandas-dataframes) written by [@tdpetrou](https://github.com/tdpetrou).

### Contributing

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

You can help by:

- [Reporting a bug](https://github.com/chezou/tabula-py/issues).
- Adding or editing documentation.
- Contributing code via a Pull Request. See also [for the contribution](docs/contributing.rst)
- Write a blog post or spread the word about `tabula-py` to people who might be able to benefit from using it.

#### Contributors

- [@lahoffm](https://github.com/lahoffm)
- [@jakekara](https://github.com/jakekara)
- [@lcd1232](https://github.com/lcd1232)
- [@kirkholloway](https://github.com/kirkholloway)
- [@CurtLH](https://github.com/CurtLH)
- [@nikhilgk](https://github.com/nikhilgk)
- [@krassowski](https://github.com/krassowski)
- [@alexandreio](https://github.com/alexandreio)
- [@rmnevesLH](https://github.com/rmnevesLH)
- [@red-bin](https://github.com/red-bin)
- [@Gallaecio](https://github.com/Gallaecio)
- [@red-bin](https://github.com/red-bin)
- [@alexandreio](https://github.com/alexandreio)
- [@bpben](https://github.com/bpben)
- [@Bueddl](https://github.com/Bueddl)
- [@cjotade](https://github.com/cjotade)
- [@codeboy5](https://github.com/codeboy5)
- [@manohar-voggu](https://github.com/manohar-voggu)
- [@deveshSingh06](https://github.com/deveshSingh06)
- [@grfeller](https://github.com/grfeller)
- [@djbrown](https://github.com/djbrown)
- [@swar](https://github.com/swar)
- [@mvoggu](https://github.com/mvoggu)
- [@tdpetrou](https://github.com/tdpetrou)

#### Another support

You can also support our continued work on `tabula-py` with a donation on GitHub Sponsors or [Patreon](https://www.patreon.com/chezou).

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "tabula-py",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "Aki Ariga <chezou@gmail.com>",
    "keywords": "data frame,pdf,table",
    "author": "",
    "author_email": "Aki Ariga <chezou@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/bb/fd/e5dc93f8b9227677bdecc0d7490347c84d8885f9a63d0db000997e0b6d2d/tabula-py-2.8.2.tar.gz",
    "platform": null,
    "description": "# tabula-py\n\n[![Build Status](https://github.com/chezou/tabula-py/actions/workflows/pythontest.yml/badge.svg)](https://github.com/chezou/tabula-py/actions/workflows/pythontest.yml)\n[![PyPI version](https://badge.fury.io/py/tabula-py.svg)](https://badge.fury.io/py/tabula-py)\n[![Documentation Status](https://readthedocs.org/projects/tabula-py/badge/?version=latest)](https://tabula-py.readthedocs.io/en/latest/?badge=latest)\n[![Patreon](https://img.shields.io/badge/patreon-donate-orange.svg)](https://www.patreon.com/chezou)\n\n`tabula-py` is a simple Python wrapper of [tabula-java](https://github.com/tabulapdf/tabula-java), which can read tables in a PDF.\nYou 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.\n\nYou can see [the example notebook](https://nbviewer.jupyter.org/github/chezou/tabula-py/blob/master/examples/tabula_example.ipynb) and try it on Google Colab, or we highly recommend reading [our documentation](https://tabula-py.readthedocs.io/en/latest/), especially the FAQ section.\n\n![tabula-py example](https://github.com/chezou/tabula-py/raw/master/example.png)\n\n## Requirements\n\n- Java 8+\n- Python 3.8+\n\n### OS\n\nI 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](https://tabula-py.readthedocs.io/en/latest/getting_started.html#get-tabula-py-working-windows-10).\n\n## Usage\n\n- [Documentation](https://tabula-py.readthedocs.io/en/latest/)\n  - [FAQ](https://tabula-py.readthedocs.io/en/latest/faq.html) would be helpful if you have an issue\n- [Example notebook on Google Colaboratory](https://colab.research.google.com/github/chezou/tabula-py/blob/master/examples/tabula_example.ipynb)\n\n### Install\n\nEnsure you have a Java runtime and set the PATH for it.\n\n```bash\npip install tabula-py\n```\n\n### Example\n\ntabula-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\u00a0file as a CSV, a TSV, or a JSON.\u00a0\u00a0\n\n```py\nimport tabula\n\n# Read pdf into list of DataFrame\ndfs = tabula.read_pdf(\"test.pdf\", pages='all')\n\n# Read remote pdf into list of DataFrame\ndfs2 = tabula.read_pdf(\"https://github.com/tabulapdf/tabula-java/raw/master/src/test/resources/technology/tabula/arabic.pdf\")\n\n# convert PDF into CSV file\ntabula.convert_into(\"test.pdf\", \"output.csv\", output_format=\"csv\", pages='all')\n\n# convert all PDFs in a directory\ntabula.convert_into_by_batch(\"input_directory\", output_format='csv', pages='all')\n```\n\nSee [an example notebook](https://nbviewer.jupyter.org/github/chezou/tabula-py/blob/master/examples/tabula_example.ipynb) for more details. I also recommend reading [the tutorial article](https://aegis4048.github.io/parse-pdf-files-while-retaining-structure-with-tabula-py) written by [@aegis4048](https://github.com/aegis4048), and [another tutorial](https://www.dunderdata.com/blog/read-trapped-tables-within-pdfs-as-pandas-dataframes) written by [@tdpetrou](https://github.com/tdpetrou).\n\n### Contributing\n\nInterested in helping out? I'd love to have your help!\n\nYou can help by:\n\n- [Reporting a bug](https://github.com/chezou/tabula-py/issues).\n- Adding or editing documentation.\n- Contributing code via a Pull Request. See also [for the contribution](docs/contributing.rst)\n- Write a blog post or spread the word about `tabula-py` to people who might be able to benefit from using it.\n\n#### Contributors\n\n- [@lahoffm](https://github.com/lahoffm)\n- [@jakekara](https://github.com/jakekara)\n- [@lcd1232](https://github.com/lcd1232)\n- [@kirkholloway](https://github.com/kirkholloway)\n- [@CurtLH](https://github.com/CurtLH)\n- [@nikhilgk](https://github.com/nikhilgk)\n- [@krassowski](https://github.com/krassowski)\n- [@alexandreio](https://github.com/alexandreio)\n- [@rmnevesLH](https://github.com/rmnevesLH)\n- [@red-bin](https://github.com/red-bin)\n- [@Gallaecio](https://github.com/Gallaecio)\n- [@red-bin](https://github.com/red-bin)\n- [@alexandreio](https://github.com/alexandreio)\n- [@bpben](https://github.com/bpben)\n- [@Bueddl](https://github.com/Bueddl)\n- [@cjotade](https://github.com/cjotade)\n- [@codeboy5](https://github.com/codeboy5)\n- [@manohar-voggu](https://github.com/manohar-voggu)\n- [@deveshSingh06](https://github.com/deveshSingh06)\n- [@grfeller](https://github.com/grfeller)\n- [@djbrown](https://github.com/djbrown)\n- [@swar](https://github.com/swar)\n- [@mvoggu](https://github.com/mvoggu)\n- [@tdpetrou](https://github.com/tdpetrou)\n\n#### Another support\n\nYou can also support our continued work on `tabula-py` with a donation on GitHub Sponsors or [Patreon](https://www.patreon.com/chezou).\n",
    "bugtrack_url": null,
    "license": "The MIT License (MIT) Copyright (c) 2016 Michiaki Ariga  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "Simple wrapper for tabula-java, read tables from PDF into DataFrame",
    "version": "2.8.2",
    "project_urls": {
        "Bug Reports": "https://github.com/chezou/tabula-py/issues",
        "Funding": "https://github.com/sponsors/chezou",
        "Homepage": "https://github.com/chezou/tabula-py"
    },
    "split_keywords": [
        "data frame",
        "pdf",
        "table"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b8037417bf7b73ec99bc3675cc25b5f117ee6013f3982951f0a0ea6563cda80f",
                "md5": "97fa5a1106f7bf7298ae84b9777deb05",
                "sha256": "046d1680959cb5a146f92d9c0c6fb16f68ee2820f541ddbc1df986bfe737aa81"
            },
            "downloads": -1,
            "filename": "tabula_py-2.8.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "97fa5a1106f7bf7298ae84b9777deb05",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 12020597,
            "upload_time": "2023-09-22T23:04:46",
            "upload_time_iso_8601": "2023-09-22T23:04:46.128118Z",
            "url": "https://files.pythonhosted.org/packages/b8/03/7417bf7b73ec99bc3675cc25b5f117ee6013f3982951f0a0ea6563cda80f/tabula_py-2.8.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bbfde5dc93f8b9227677bdecc0d7490347c84d8885f9a63d0db000997e0b6d2d",
                "md5": "8967cad8a534c0f1ac997b037fd73df1",
                "sha256": "d73593a11c29e1c14b1a0ede91cd5ef63668118f8a2b085fe77e78c616b1cb33"
            },
            "downloads": -1,
            "filename": "tabula-py-2.8.2.tar.gz",
            "has_sig": false,
            "md5_digest": "8967cad8a534c0f1ac997b037fd73df1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 12459508,
            "upload_time": "2023-09-22T23:04:48",
            "upload_time_iso_8601": "2023-09-22T23:04:48.439464Z",
            "url": "https://files.pythonhosted.org/packages/bb/fd/e5dc93f8b9227677bdecc0d7490347c84d8885f9a63d0db000997e0b6d2d/tabula-py-2.8.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-09-22 23:04:48",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "chezou",
    "github_project": "tabula-py",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "tabula-py"
}
        
Elapsed time: 0.14715s