You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
325 B
10 lines
325 B
1 year ago
|
import pandas as pd
|
||
|
import pymysql
|
||
|
|
||
|
conn = pymysql.connect(user="root", password="cyh0110", database="stu_sys", host="127.0.0.1", port=3306)
|
||
|
|
||
|
data_frame = pd.read_sql("select * from student limit 10", conn)
|
||
|
print(data_frame.keys().tolist())
|
||
|
for row in data_frame.itertuples():
|
||
|
print([row[i] for i in range(1, len(row))])
|