0

I ran the following code:

import pandas as pd

data = pd.read_excel(r'C:\Users\ПеКа476\Desktop\Matrices\118_OG_6-sec_imcoh_sensors_4-8.xlsx')
print(data)

but this yielded an error:

FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\ПеКа476\\Desktop\\Matrices\\118_OG_6-sec_imcoh_sensors_4-8.xlsx'

enter image description here

enter image description here

The path is fully correct: C:\Users\ПеКа476\Desktop\Matrices\118_OG_6-sec_imcoh_sensors_4-8.xlsx — I take it from the file description. Can anyone please spot the error? I was trying to read other questions about this problem, but they report the same problem: unfull file path. But in my situation, the file path is almost correct.

JP Maulion
  • 2,454
  • 1
  • 10
  • 13
Arsenii
  • 177
  • 8

1 Answers1

1

Open the excel file.

Click File.

Go to "Info"

Click "Copy Path"

This ensures copying the correct path, including the correct extension.

Eduards
  • 1,734
  • 2
  • 12
  • 37