请教,使用pymysql向mysql数据库表中插入数据失败,显示empty set

代码如下:
import pymysql
import re

连接数据库,这段代码就先略过了,应该是没有问题

def close(self):
    self.cur.close()
    self.db.close()

def insert_words(self,filename):
    file = open(filename)
    data = []
    for line in file:
        tmp = re.split("\s+",line,5)
        data.append(tmp)
    try:
        sql="insert into Average_leaf_rolling_rate (the_sixth_day," \
            "the_nineteenth_day," \
            "the_thirty_second_day," \
            "the_forty_fourth_day," \
            "the_fifty_fifth_day," \
            "the_sixty_ninth_day) values (%s,%s,%s,%s,%s,%s);"
        self.cur.executemany(sql,data)
        self.db.commit()
    except:
        self.db.rollback()

if name == 'main':
aver = Aver()
aver.insert_words("111.txt")
aver.close()


def insert_words(self,filename):
    file = open(filename)
    data = []
    for line in file:
        tmp = re.split("\s+",line,5)
        data.append(tmp)
    print(data)   # 看看data 里都有啥?
    try:
        sql="insert into Average_leaf_rolling_rate (the_sixth_day," \
            "the_nineteenth_day," \
            "the_thirty_second_day," \
            "the_forty_fourth_day," \
            "the_fifty_fifth_day," \
            "the_sixty_ninth_day) values (%s,%s,%s,%s,%s,%s);"
        self.cur.executemany(sql,data)
        self.db.commit()
    except:
        self.db.rollback()
您好,我是有问必答小助手,您的问题已经有小伙伴帮您解答,感谢您对有问必答的支持与关注!
PS:问答VIP年卡 【限时加赠:IT技术图书免费领】,了解详情>>> https://vip.csdn.net/askvip?utm_source=1146287632