python用pandas遍历csv文件

import pandas as pd

df = pd.read_csv('a.csv')
for index, row in df.iterrows():
    x, y = row['X'], row['Y'] # 像字典一样取出需要的值

 

posted @ 2020-06-04 10:46  牛郎  阅读(11755)  评论(1编辑  收藏  举报