def __insert_values(self, values):
    cursor = self.connection.cursor()
cursor.executemany(
    """
        insert into `values` (ensg, value, sampleid)
        values (%s, %s, %s)"""
    , values)
Python + MySQLdb executemany