I'm currently working on a real-time json via python my idea : - extract and wrangle json via pandas python (did it : about 3720 x 15 df) - convert dataframe to tables in mysql (using pymysql on windows)
my code :
dfc=dfc.values.tolist()
coection = pymysql.coect(host='localhost',
user='root',
password='',
db="decaux",
charset='utf8mb4')
with coection.cursor() as cursor:
for rows in dfc:
sql7="insert into contracts(id,contract_name,commercial_name) values(%s, %s, %s)"
data = (rows[0],rows[1],rows[2])
cursor.execute(sql7,data)
but nothing happen... what did I do wrong ? Is there a better idea ?
