tushare ts pandas pd time pymysql numpy np ## 打开后注册获取token ts.set_token() pro = ts.pro_api(); stock_basic_data = pro.stock_basic(===) datalist = np.array(stock_basic_data).tolist() conn=pymysql.connect(= = == ==) cur = conn.cursor() sql=\ : cur.executemany(sqldatalist) conn.commit() e: (e) conn.rollback() cur.close() conn.close()