I couldn't understand while file is not considered by the interpreter
csv_data = csv.reader(file('D:\\Eclipse_Python\\Python\\com\\praveen\\pandas\\iplStats.csv'))
for row in csv_data:
print(row)
cur.execute('PREPARE stmt FROM INSERT INTO praveendb.iplstats (Wins,Losses,Year,Loss,Team) VALUES(?,?,?,?,?)', row)
ERROR:
Traceback (most recent call last):
File "D:\Eclipse_Python\Python\pandasLibDataFrame.py", line 28, in <module>
csv_data = csv.reader(file('D:\\Eclipse_Python\\Python\\pandas\\iplStats.csv'))
NameError: name 'file' is not defined