我正在尝试使用 pandas 将数据帧文件写入 csv。我收到以下错误 AttributeError: 'list' object has no attribute 'to_csv'。我相信我正确地编写了语法,但是有人能指出我的语法在尝试将数据帧写入 csv 时哪里不正确吗?这是文件的链接:https ://s22.q4cdn.com/351912490/files/doc_financials/quarter_spanish/2018/2018.02.25_Release-4Q18_ingl%C3%A9s.pdf 感谢您的宝贵时间!
import tabula
from tabula import read_pdf
import pandas as pd
from pandas import read_json, read_csv
a = read_pdf(r"C:\Users\Emege\Desktop\micro 1 true\earnings_release.pdf",\
multiple_tables= True, pages = 15, output_format = "csv",\
)
print(a)
a.to_csv("a.csv",header = False, index = False, encoding = "utf-8")