【问题标题】:How to find table region for camelot如何找到骆驼的表格区域
【发布时间】:2019-09-20 09:00:51
【问题描述】:

正如 camelot 中提到的,我们可以从特定区域提取表格,例如:

tables = camelot.read_pdf('table_regions.pdf', table_regions=['170,370,560,270'])

但是我怎样才能为我的 pdf 找到这些区域。

【问题讨论】:

    标签: python-camelot


    【解决方案1】:

    您可以通过一些可视化调试来检测这些区域。

    https://camelot-py.readthedocs.io/en/master/user/advanced.html#visual-debugging

    【讨论】:

      【解决方案2】:

      我知道这是一个迟到的回复 - 但我刚刚发现了一个可能的解决方案。

      如果您正在寻找一种自动提取方法,您可以在第一步中使用lattice,使用tables[0]._bbox 检索表边界,然后在第二次调用camelot.read_pdf() 时将这些数字用于参数@987654324 @。

      请注意,对于 bbox,它们的排序格式很奇怪。

      【讨论】:

        猜你喜欢
        • 2012-09-13
        • 2014-07-12
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2023-04-02
        • 1970-01-01
        • 2021-11-04
        • 1970-01-01
        相关资源
        最近更新 更多