如何使用python将pdf文件转换为excel文件

Yuv*_*ngh 1 python csv export-to-csv tabula convertto-json

我想将pdf文件转换为excel并通过python将其保存在本地。我已将 pdf 转换为 excel 格式,但我应该如何将其保存在本地?

我的代码:

df = ("./Downloads/folder/myfile.pdf")
tabula.convert_into(df, "test.csv", output_format="csv", stream=True)
Run Code Online (Sandbox Code Playgroud)

ska*_*l05 6

您可以指定整个输出路径,而不仅仅是output.csv

df = ("./Downloads/folder/myfile.pdf")
output = "./Downloads/folder/test.csv"
tabula.convert_into(df, output, output_format="csv", stream=True)
Run Code Online (Sandbox Code Playgroud)

希望这能回答你的问题!!!