我有一個從 pdf 中提取表格數(shù)據(jù)的代碼,我想將數(shù)據(jù)框轉(zhuǎn)換為字典,如果我在表格中提到輸出為 JSON,它也會提供不需要的坐標。我只想要表中的數(shù)據(jù)。如果將數(shù)據(jù)框轉(zhuǎn)換為字典,我可以進行其他處理工作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)
1 回答

函數(shù)式編程
TA貢獻1807條經(jīng)驗 獲得超9個贊
添加回答
舉報
0/150
提交
取消