python pandas 读取msql并转置数据表
import random,string,json,pymysql import pandas as pd connect = pymysql.connect(user = '', password = 'h', db = 'g, host = 'r', port = 3306, charset = 'utf8' ) con = connect.cursor() sql="select * from sheet1" aa=pd.read_sql(sql,con=connect) aa.transpose()