I am trying to import a CSV file but my code breaks around the 'r\
' can any one help me work out how to resolve this?
cursor.execute ("LOAD DATA INFILE '/tmp/trains.csv' INTO TABLE trains FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\\r\
'IGNORE 1 LINES;")
Try doubling up on the backslashes:
LINES TERMINATED BY '\\\\r\\\
Cheers that looks like it would work just need to solve an issue with the columns now
Can someone help me??? Is the node.js part od python or its separate program??? I will start learn node,js thats the future for sure...
If you dont know what node.js even is, I'm not sure how you can be certain "its the future" and something you want to learn.
To answer your question, it has nothing to do with Python.
NVm....i will find it and let u know...