使用Camelot-py从.PDF抓取表格数据,并且没有拾取堆积的文本行(请参阅下面的第9和10行)
Rows 9 and 10 are void of text for account.
https://camelot-py.readthedocs.io/en/master/user/advanced.html#specify-table-areas
这是我使用的.ipynb格式的代码。第一个块用于第一个按预期方式提取的表,第二个块用于第9页。
表格
tables= camelot.read_pdf(r'C:\PDFFilePath',pages='9',line_scale=40)
tables[0].to_csv(r'Loans&Leases')
camelot.plot(tables[0],kind ='contour')
plt.show()
使用MatPlotLib,我可以看到Camelot正在正确检测第9页的表区域/网格。
这是PDF的Google云端硬盘链接
任何见识将不胜感激。