import sqlite3
import csv
conn = sqlite3.connect('Data.db')
cs = conn.cursor()
cs.execute('''create table data1(
id int primary key not null,
Nuclide varchar not null ,
Z int not null,
N int not null,
Decaymode varchar,
Halflife varchar,
Kev varchar,
Abundance varchar
)''')
with open('data1.csv', 'r', encoding='utf-8') as b:
data = csv.reader(b)
for row in data:
# print(row)
cs.execute(
'insert into data1 values ("{}","{}","{}","{}","{}","{}","{}","{}")'.format(row[0], row[1], row[2], row[3], row[4], row[5], row[6], row[7]))
print("successful")
conn.commit()
conn.close()