connection = MySQLdb.Connect(host='**', user='**', passwd='**', db='**')
cursor = connection.cursor()
query = (
    """LOAD DATA INFILE '/path/to/my/file' INTO TABLE sometable FIELDS TERMINATED BY ';' ENCLOSED BY '"' ESCAPED BY '\\\\'"""
    )
cursor.execute(query)
Пример MySQL LOAD DATA LOCAL INFILE в python?