I am attempting to insert data into a MySQL database. I am using python 2.7 and I am using the mysql.connector.
My error is:
mysql.connecto
You have to convert the tuple which contains the value to insert into a 'full tuple'. e.g.:
for np in blob.noun_phrases:
np=(np,)
In a generic example, if you just have one column to insert, it would be:
to_insert=('A value to insert',)
Lastly, if you had multiple values to insert at a time:
to_insert_multiple=[('value1',), ('value2',), ('valueN',)]
I hope it helps, it worked for me in py3.7