Skip to content
Sign upLog in
← Back to Community

Reading csv file

Profile icon
pavanillapani

I am unable to open the CSV file. The path was located in the local machine.

Voters
Profile icon
Astroesrom
Profile icon
Sherik77
Profile icon
replitchang2
Profile icon
ArthurMaciel
Profile icon
zhaifanghong
Profile icon
dahochoi
Profile icon
20s1040z
Profile icon
AmmarYusri1
Profile icon
PrimitMistry
Profile icon
Ignaciopy
Comments
hotnewtop
Profile icon
Firekeeper

Dude, so did it work out at last?! I am having a similar issue, and I would really like to know how can I actually open this damn file. Actually, I need it as soon as possible, as my boss asked me to study that file. I have already asked for one more day, but the problem is that I haven't even opened that damn file! I have tried to open it on another platform and it also did not work. Actually, I have read some good information about csv files on https://www.import2.com/csv and there was something about opening this damn files, hope it is going to work.

Profile icon
ArchieMaclean

You can't use files from your own computer in repl.it. You will have to upload the file yourself.
Click on the 3 dots in the top left and click Upload File.

image

Then upload your CSV file.

You can then just do what you are doing, but with the file name, e.g. if the CSV file is called file.csv, then:

with open('D:\Python Projects\files.csv', 'r') as data:

Please mark this as the answer if it solved your problem :)