Got a question in python | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Got a question in python

Hey guys got a question... How do you give the file name?... Because whenever I put as df = pd.read_csv('train.csv') Whenever I put this code it shows file not found.... So what should I do?... But it is there in my system... I have even tried other ways like df = pd.read_csv(r'#and here the file location') and still it shows file not found error ... What to do?

15th Sep 2020, 2:12 PM
Mehul sathish
Mehul sathish - avatar
1 Answer
+ 4
If you are real sure to use the correct naming for the directory, filename and extension, you can run this code to see the current working directury: import os print(os.getcwd()) Now you can check if this folder contains the desired file.
15th Sep 2020, 2:42 PM
Lothar
Lothar - avatar