如果这是多余的道歉,我花了很多时间试图找到答案,但没有任何提供的技巧似乎做任何事情。我试图使用Python读入SQLite的股票数据的CSV文件(雅虎财经):SQLite Python插入 - 提供的绑定数量不正确
Ticker Open High Low Close Volume AdjClose
AA 1/5/11 16.34 16.59 16.11 16.56 48278700 16.56
我使用下面的赞扬:
to_db = [(i['Ticker'], i['Open'], i['High'], i['Low'],i['Close'], i['Volume'], i['AdjClose']) for i in dr]
c.executemany("insert into stock_test1 (Ticker, Date, Open, High, Low, Close, Volume, AdjClose) values (?, ?, ?, ?, ?, ?, ?, ?);", to_db)
,我也得到:
sqlite3.ProgrammingError:提供的绑定数量不正确。当前的语句使用8,并提供了7。
我在哪里错了?
太感谢你了!这对我来说是非常粗心大意的,抱歉要花时间,再次感谢您的帮助! – cranberry 2011-01-11 06:07:16