# Table extraction using Tabula

**URL:** <https://discuss.python.org/t/table-extraction-using-tabula/21263>\
**Category:** Python Help\
**Tags:** help\
**Created:** [November 21, 2022, 6:48am UTC](https://discuss.python.org/t/table-extraction-using-tabula/21263 "2022-11-21T06:48:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![arvin\_90](https://avatars.discourse-cdn.com/v4/letter/a/df705f/32.png) [@arvin\_90](https://discuss.python.org/u/arvin_90)\
**Post date:** [November 21, 2022, 6:48am UTC](https://discuss.python.org/t/table-extraction-using-tabula/21263/1 "2022-11-21T06:48:23Z")

</div>

While reading a pdf file using  
“df = tabula.read\_pdf(pdf\_file, pages=‘all’)” —\> displays all tables from all pages.

but when converting into a Pandas dataframe using

tables = pd.DataFrame(tabula.read\_pdf(pdf\_file, pages = ‘all’, lattice = ‘True’)[0])—\> display only the table on the first page.

---

<div class="post-metadata">

**Author:** ![vovavili](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/vovavili/32/38249_2.png) [@vovavili](https://discuss.python.org/u/vovavili)\
**Post date:** [November 21, 2022, 9:01am UTC](https://discuss.python.org/t/table-extraction-using-tabula/21263/2 "2022-11-21T09:01:46Z")

</div>

1. `[0]` indicates the first element in a sequence. Your code deliberately seeks out only the first available dataframe.

2. Tabula already returns a list of dataframes. You can join them with [`pd.concat`](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.concat.html), or with [more advanced logic](https://pandas.pydata.org/docs/user_guide/merging.html).
