如何在Pandas中遍历DataFrame中的行?
DataFrame
import pandas as pd inp = [{'c1':10, 'c2':100}, {'c1':11,'c2':110}, {'c1':12,'c2':120}]df = pd.DataFrame(inp)print df
c1 c20 10 1001 11 1102 12 120
for row in df.rows: print row['c1'], row['c2']
for date, row in df.T.iteritems():
for row in df.iterrows():
row
偶然的你
慕码人8056858
相关分类