FileNotFoundError: [Errno 2] 导入 Excel 文件到 pandas 时出现错误
- 论坛
- FileNotFoundError: [Errno 2] 导入 Excel 文件到 pandas 时出现错误
20 浏览
FileNotFoundError: [Errno 2] 导入 Excel 文件到 pandas 时出现错误
这个问题已经有了答案:
当导入 Excel 文件到 Pandas 时,我遇到了“FileNotFoundError: [Errno 2] No such file or directory: \'census_data.xlsx\'”的错误提示。我已经仔细检查了文件,但仍然出现了这个错误。
以下是我的代码:
import xlrd book = xlrd.open_workbook('census_data.xlsx') for sheet in book.sheets(): print (sheet.name)
admin 更改状态以发布 2023年5月21日