CashlessConsumer's picture
Upload folder using huggingface_hub
1e66e59 verified
Raw History Blame Contribute Delete
497 Bytes
import json
import sqlite3
connection = sqlite3.connect('ChennaiRainFall.db')
cursor = connection.cursor()
cursor.execute('Create Table if not exists RainFall (name Text, course Text, roll Integer)')
n
traffic = json.load(open('json_file.json'))
columns = ['name','course','roll']
for row in traffic:
keys= tuple(row[c] for c in columns)
cursor.execute('insert into Student values(?,?,?)',keys)
print(f'{row["name"]} data inserted Succefully')
connection.commit()
connection.close()