Bradley Thomas
Bradley Thomas

Reputation: 1

FileNotFoundError: [Errno 2] No such file or directory: 'Data.csv'

I'm having an error with the above, I am in no rush and ready to learn, I have some basic coding experience with javascript, but I am still learning so a simple explanation would be fine :)

From investigating other posts on stack overflow, I can see that there must be some issue with the directory which is being called in the line:

dataset = pd.read_csv('Data.csv')

That is, the program is trying to read the line and cannot process because the directory is different. Where does the function try to read files from? I have the files saved on my local drive and as you can see on the image I have uploaded.

Can anybody point me in the right direction?

Error:

Error

Thanks,

B

Upvotes: 0

Views: 7940

Answers (1)

Mjölnir Chen
Mjölnir Chen

Reputation: 11

I just get the same problem, and I figure it out.

try

dataset = pd.read_csv('/Data.csv')

Upvotes: 1

Related Questions