I have a data(results) that looks like this:
I would like to insert the data frame to a Mysql table (alarm):
What i have done so far:
session = Session()
for _, row in results_1.iterrows():
insert_stmt = f"insert into alarm (service) values ({row['service']}) ;"
session.execute(insert_stmt)
session.commit()
session.close
## insert to mysql
DB_import_ref(db_table_name)
This keeps sending the error:
check the manual that corresponds to your MySQL server version for the right syntax to use near '['CS5', 'BE'])' at line 1")
Plz any help to insert a column of lists to Mysql ?