import pymysql
import pandas as pd
conn = pymysql.connect(host='localhost', user='root', passwd='1111', db='py1', charset='utf8') # mysql连接语句
sql_query = 'select*from py1.user' # sql查询语句
data = pd.read_sql(sql_query, con=conn)
conn.close()
# print(data)
print(data.info()) # 查看每个字段情况,类型,是否为空等
print(data.describe()) # 查看数据信息
print(data.isnull().sum())