I have kept csv file in D directory and trying to read that csv file using python programming. This is my code in python:
import csv
try:
path = "D:\\abc.csv"
with open("path", "rb") as csvfile:
readCSV = csv.reader(csvfile, delimiter=',')
for row in readCSV:
print (row)
except Exception, e:
raise e
This is the error I am getting:
The current working directory is F:\
Traceback (most recent call last):
File "F:\directory.py", line 16, in <module>
raise e
IOError: [Errno 2] No such file or directory: 'path'