· 7 years ago · Dec 10, 2018, 11:20 AM
1temp=[[aberturas],[fechamentos], [highs], [lows], [volumes], [medias], [data_str]]
2 conexao=sqlite3.connect("negociacao.db")
3 conexao.row_factory=sqlite3.Row
4 cursor=conexao.cursor()
5 cursor.execute('''
6 create table if not exists negociacao(
7 id integer primary key autoincrement,
8 Open float,
9 Close float,
10 High float,
11 Low float,
12 Volume float,
13 Media float,
14 Data date)''')
15 cursor.executemany('''
16 insert into negociacao(Open,Close,High,Low,Volume,Media,Data)values(?,?,?,?,?,?,?)''',(temp,))
17 conexao.commit()
18 cursor.close()
19 conexao.close()