我有一个从 pdf 中提取表格数据的代码,我想将数据框转换为字典,如果我在表格中提到输出为 JSON,它也会提供不需要的坐标。我只想要表中的数据。如果将数据框转换为字典,我可以进行其他处理工作from tabula import read_pdffrom tabulate import tabulateimport pandas as pddf = read_pdf("http://www.uncledavesenterprise.com/file/health/Food%20Calories%20List.pdf",multiple_tables=True,pages='3' ,pandas_options={'header':None},guess = False)print (df)
添加回答
举报
0/150
提交
取消