skip to Main Content

I am trying to import a csv file to mysql using python. I am getting an error ' TypeError: not enough arguments for format string' – Phpmyadmin

I am using phpmyadmin for mysql databse. import csv import MySQLdb import pymysql db = pymysql.connect( host="127.0.0.1", port=3308, user="root", passwd="", db="database_name" ) cursor = db.cursor() csv_data = csv.reader(r'E:py_docsfile101.csv') next(csv_data) for row in csv_data: cursor.execute('INSERT INTO table_name(A, B, C, D, E,…

VIEW QUESTION
Back To Top
Search