Pdfplumber - 提取没有任何边框的 pdf 表格

发布于 2025-01-09 22:01:31 字数 236 浏览 6 评论 0原文

我正在尝试将此处图像中所示的表格提取到数据框中。我尝试使用 tabula-py 提取代码,但 read_pdf 返回了我 []。不确定 tabula-py 是否是正确使用的模块。有人可以帮忙吗?

I am trying to extract the table as shown in the image here into a data frame. I tried using tabula-py to extract the code but read_pdf returned me []. Not sure if tabula-py is the right module to use. Can anyone help?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

习ぎ惯性依靠 2025-01-16 22:01:31

我发现了错误。我使用了错误的选项。我应该使用流选项而不是网格选项。

df = tabula.read_pdf(pdf_path, stream=True, pages=1, area=(87,72,160 , 200), pandas_options={'header': None})

谢谢。

I figured out the error. I was using the wrong option. I should have used the stream option instead of the lattice option.

df = tabula.read_pdf(pdf_path, stream=True, pages=1, area=(87,72,160 , 200), pandas_options={'header': None})

Thanks.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文