Recently, I'm trying to make some database. (I'm new to programming) When I'm trying to run following code, I'm receiving this error:
sqlite3.OperationalError: near ".27": syntax error
def file_write(self, name, value):
con = sqlite3.connect("c:/Users/DB.db")
cursor = con.cursor()
cursor.execute("CREATE TABLE {} (Date text, Value1 int, Value2 int, Value3 int, Value4 int, Value5 int, Value6 float, Value7 float, Value8 float)".format(name))
for i in range(3):
cursor.execute("INSERT INTO {0} VALUES({1},{2},{3},{4},{5},{6},{7},{8},{9})".format(name, value[i][0], value[i][1], value[i][2], value[i][3], value[i][4], value[i][5], value[i][6], value[i][7], value[i][8]))
#cursor.execute("INSERT INTO {0} VALUES({1},{2},{3},{4},{5},{6},{7},{8},{9})".format(name, '2020.03.27', '12500', '13100', '15100', '10950', '31323050', '10440.0', '10524.5', '45.0'))
con.commit()
con.close()
Values are DataFrame and remark's values are matched with each value[i][j]
.
I spent my all day with this problem please help me