""" @author: luojunhui """ import pandas as pd from tqdm import tqdm from applications import PQMySQL db = PQMySQL() file = pd.read_excel("mean_cache.xlsx") data_list = file.values.tolist() for line in tqdm(data_list): account_name = line[0] index = line[1] avg_read = line[2] sql = f""" UPDATE long_articles_accounts SET account_position_read_avg = %s where account_name = %s and account_position = %s; """ db.update(sql, params=(avg_read, account_name, index)) print("successful")