FileNotFoundError:[Errno 2]没有此类文件或目录(正在尝试将PDF文件更改为CSV文件)

2024-04-27 09:32:06 发布

您现在位置:Python中文网/ 问答频道 /正文

我是一个新的python学习者。我正在尝试使用Spyder将PDF文件更改为CSV文件。但是,我无法运行代码,因为系统告诉我没有这样的文件和目录。我怎样才能解决这个问题

输入

import tabula
dfs = tabula.read_pdf("RN(G)_GazetteList.pdf", pages='all')


tabula.convert_into("RN(G)_GazetteList.pdf", "output.csv", output_format="csv", pages='all')


tabula.convert_into_by_batch("input_directory", output_format='csv', pages='all')

输出

FileNotFoundError: [Errno 2] No such file or directory: 'RN(G)_GazetteList.pdf'

多谢各位


Tags: 文件csvformatconvertoutputpdf学习者rn