MySQL Connector/Python - insert python variable to MySQL table

后端 未结 3 1769
旧巷少年郎
旧巷少年郎 2020-12-16 03:11

I\'m trying to insert a python variable into a MySQL table within a python script but it is not working. Here is my code

add_results=(\"INSERT INTO account_         


        
3条回答
  •  [愿得一人]
    2020-12-16 03:46

    One of your passed values could be of type numpy.float64 which is not recognized by the MySQL connector. Cast it to a genuine python float on populating the dict.

提交回复
热议问题