pandas行迭代
for i,j in df01.iterrows():
print(i)
print(j['col01_name'],j['col02_name'])
不能直接循环df01,此时遍历的是DataFrame的列名:
for i in df01:
print(i)
for i,j in df01.iterrows():
print(i)
print(j['col01_name'],j['col02_name'])
不能直接循环df01,此时遍历的是DataFrame的列名:
for i in df01:
print(i)