I'm having a bit of trouble loading an CSV file into a mysql database. Here's my code:
for q in csvReader:
name, price, LastUpdate, today = q
co.execute("""INSERT INTO fundata (name, price, LastUpdate) VALUES(name, price, LastUpdate);""",q)
I get an error saying TypeError: not all arguments converted during string formatting.
The name column is a string, price is a float, and LastUpdate is a date. I read a bit and saw some scripts that wrapped the values in %(value)s and %(value)d (in my case instead of d I use f) but then I get a different error:
TypeError: format requires a mapping
Can anyone help show me what I am doing wrong?
Thank you!