excel_file = r"C:\Users\hea\Documents\Work\Test.xlsx". It has this error message.
I checked file path, name or extension and all seems fine. I loaded this code to ChatGPT and it says it is correct. So I don't know what's wrong. Can anyone please help?
[?2004l Traceback (most recent call last): File "/home/main.py", line 115, in <module> df = pd.read_excel(excel_file) File "/usr/lib/python3/dist-packages/pandas/util/_decorators.py", line 311, in wrapper return func(*args, **kwargs) File "/usr/lib/python3/dist-packages/pandas/io/excel/_base.py", line 364, in read_excel io = ExcelFile(io, storage_options=storage_options, engine=engine) File "/usr/lib/python3/dist-packages/pandas/io/excel/_base.py", line 1191, in __init__ ext = inspect_excel_format( File "/usr/lib/python3/dist-packages/pandas/io/excel/_base.py", line 1070, in inspect_excel_format with get_handle( File "/usr/lib/python3/dist-packages/pandas/io/common.py", line 711, in get_handle handle = open(handle, ioargs.mode) FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\hea\\Documents\\Work\\Test.xlsx' [?2004h