#假设示例 teas = pd.DataFrame(columns=['name','url']) teas.loc[0] = ['陈xx','http://xxx.htm'] teas.loc[1] = ['黄xx','http://xxx.htm'] teas.loc[2] = ['朱xx','http://xxx.htm'] #遍历行的下标以及其中列的值 for ind, row in teas.iterrows(): print(ind) print(row['name']) print(row['url'])