'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:
Thanks,
B
Solution 1:[1]
I just get the same problem, and I figure it out.
try
dataset = pd.read_csv('/Data.csv')
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Mjölnir Chen |