1for index, row in df.iterrows():
2 print(row['c1'], row['c2'])
3
4Output:
5 10 100
6 11 110
7 12 120
1df = pd.DataFrame([{'c1':10, 'c2':100}, {'c1':11,'c2':110}, {'c1':12,'c2':120}])
2for index, row in df.iterrows():
3 print(row['c1'], row['c2'])
1# Option 1
2for row in df.iterrows():
3 print row.loc[0,'A']
4 print row.A
5 print row.index()
6
7# Option 2
8for i in range(len(df)) :
9 print(df.iloc[i, 0], df.iloc[i, 2])