0

How to read a file(csv) by using Python?

My Code: import pandas as pd a=pd.read_csv("Auto.csv") print(a) I created a csv file(Auto.csv) and now I want to read the file by using python. After starting the programm, I get an error "File b' Auto.csv' not found". Had somebody experienced this kind of problem?

11th Jul 2019, 9:08 AM
Preet
2 Respuestas
+ 1
If it's an error type of "file not found", it's probably not in the same directory as your program module, then you'd have to use the full path of the file, probably store it in a variable, and use it in the open statement.
11th Jul 2019, 9:17 AM
Anon
Anon - avatar
0
It worked. Thanks a lot
11th Jul 2019, 10:17 AM
Preet