pandas pd pd.set_option() df = pd.read_excel() (df.head())
运行后,显示下方代码,求帮忙
D:\pythonProject\venv\Scripts\python.exe D:/pythonProject/paiming.py
Traceback (most recent call last):
File "D:/pythonProject/paiming.py", line 3, in <module>
df = pd.read_excel('data.xlsx')
File "D:\pythonProject\venv\lib\site-packages\pandas\util\_decorators.py", line 299, in wrapper
return func(*args, **kwargs)
File "D:\pythonProject\venv\lib\site-packages\pandas\io\excel\_base.py", line 336, in read_excel
io = ExcelFile(io, storage_options=storage_options, engine=engine)
File "D:\pythonProject\venv\lib\site-packages\pandas\io\excel\_base.py", line 1057, in __init__
ext = inspect_excel_format(
File "D:\pythonProject\venv\lib\site-packages\pandas\io\excel\_base.py", line 938, in inspect_excel_format
with get_handle(
File "D:\pythonProject\venv\lib\site-packages\pandas\io\common.py", line 651, in get_handle
handle = open(handle, ioargs.mode)
FileNotFoundError: [Errno 2] No such file or directory: 'data.xlsx'
Process finished with exit code 1