Python 3.x 无法更新SQLite表
我无法使update语句正常工作:(-关于我缺少的内容有什么帮助吗Python 3.x 无法更新SQLite表,python-3.x,sqlite,Python 3.x,Sqlite,我无法使update语句正常工作:(-关于我缺少的内容有什么帮助吗 tickers = c.fetchall() for row in tickers: c.execute("select [Adj Close] from StockData where Symbol = ? ", (row)) AdjClose = c.fetchall() df_ta = pd.DataFrame(data = AdjClose, dtype=numpy.fl
tickers = c.fetchall()
for row in tickers:
c.execute("select [Adj Close] from StockData where Symbol = ? ", (row))
AdjClose = c.fetchall()
df_ta = pd.DataFrame(data = AdjClose, dtype=numpy.float64)
df_ta = df_ta.apply(lambda c: talib.RSI(c, timeperiod = 14))
for index, item in df_ta.iterrows():
try:
c.execute('''UPDATE StockData SET RSI = ? where Symbol = ? ''', (item.values, row))
except Exception as e:
print('Update Error: ' + str(e))
print('Updated' + str(row))
conn.commit()
print ("Number of rows updated: {}".format(c.rowcount))```
Update Error: Error binding parameter 1 - probably unsupported type.