代码
#pip install pandas
#微信公众号:行业业绩轮动首发
import pandas as pd
df= pd.read_html(r'https://www.jisilu.cn/wx/data/convertbond/')
df=df[0] #获取html中第1个table数据
print(df)
for id in range(len(df)):
code = str(df.iloc[id]['代码'])
zhangfu = df.iloc[id]['涨幅']
name = df.iloc[id]['名称']
print(code,name,zhangfu)
运行