标签:sql host style roo pymysql san mys mysql数据库 code
1 import pymysql 2 import pandas 3 db=pymysql.connect(host=‘localhost‘,port=3306,user=‘root‘,database=‘lihao‘,password=‘lh19990317‘) 4 #cursor=db.cursor() 5 sql=‘select * from sanban‘ 6 data1=pandas.read_sql_query(sql,db) 7 print(data1)
标签:sql host style roo pymysql san mys mysql数据库 code
原文地址:https://www.cnblogs.com/luckiness/p/13129810.html