The following code was run in the Jupyter Notebook.
import pandas
import pymysql
connection = pymysql.connect(host='localhost', user='root', password='123456', database='sakila')
cursor=connection.cursor()
insert_query= INSERT INTO film_text (film_id, title, description) VALUES ('1001','ZZZ ZORRO','Zorro must Fight a Womanizer in Berlin');
cursor.execute(insert_query)
connection.commit()
ERROR: File "", line 7 insert_query=INSERT INTO film_text (film_id,title,description) VALUES ('1001','ZZZ ZORRO','Zorro must Fight a Womanizer in Berlin'); ^ SyntaxError: invalid syntax
If don't plan to do highly advanced stuff with the data from python, maybe it's better to use a jupyter kernel to play with the database in plain SQL.