从pdf文件中提取同一页面中的多个表

问题描述 投票:0回答:1

我有大量的pdf文件,它们在第4页中包含5个表。我想提取这5个表中的数据。我正在使用表格,但只有第一张桌子!她是我的代码和一些示例

df = tabula.read_pdf(my_file, pages = '4', multiple_tables = True)
print(df)

the original pdf

result

有人可以帮我吗?我尝试使用pdfminer将pdf转换为文本,但它仅提取列中的文本!

python pdf tabular tabula
1个回答
0
投票

我更新了代码:df = tabula.read_pdf(my_file,pages ='4',spreadsheet = True,multiple_tables = True)而且有效。现在我得到以下结果enter image description here

如何检查每个值的结果?在每个表中?

© www.soinside.com 2019 - 2024. All rights reserved.