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])
1# creating a list of dataframe columns
2columns = list(df)
3
4for i in columns:
5
6 # printing the third element of the column
7 print (df[i][2])