【发布时间】:2019-09-20 09:00:51
【问题描述】:
正如 camelot 中提到的,我们可以从特定区域提取表格,例如:
tables = camelot.read_pdf('table_regions.pdf', table_regions=['170,370,560,270'])
但是我怎样才能为我的 pdf 找到这些区域。
【问题讨论】:
标签: python-camelot
正如 camelot 中提到的,我们可以从特定区域提取表格,例如:
tables = camelot.read_pdf('table_regions.pdf', table_regions=['170,370,560,270'])
但是我怎样才能为我的 pdf 找到这些区域。
【问题讨论】:
标签: python-camelot
您可以通过一些可视化调试来检测这些区域。
https://camelot-py.readthedocs.io/en/master/user/advanced.html#visual-debugging
【讨论】:
我知道这是一个迟到的回复 - 但我刚刚发现了一个可能的解决方案。
如果您正在寻找一种自动提取方法,您可以在第一步中使用lattice,使用tables[0]._bbox 检索表边界,然后在第二次调用camelot.read_pdf() 时将这些数字用于参数@987654324 @。
请注意,对于 bbox,它们的排序格式很奇怪。
【讨论】: