我正在尝试使用 Tabula 从 PDF 表中提取数据框。我把所有的数据都混在一起了,我很难订购它。谁能指出我的语法不正确?
表格的图像和我的 Python 会话的输出:
代码:
import tabulate as tabulate
import tabula
from tabula import read_pdf
import pandas as pd
import camelot
a = read_pdf(r"C:\Users\Emege\Downloads\cencosud.pdf", pages = 6, guess = False,\
encoding = "ISO-8859-1" ,output_format = "csv")
print(a)
a.to_csv("cen.csv", encoding = "utf-8")
b = camelot.read_pdf(r"C:\Users\Emege\Downloads\cencosud.pdf")
print(b)