In [1]:
import pandas as pd
df = pd.DataFrame([['AA', 1],['BB', 2],['CC', 3]], columns = ['name','value'])
In [2]:
df
Out[2]:
In [3]:
for i, row in df.iterrows():
print(row['name'], row['value'])
In [14]:
for row in df.itertuples():
print(row)
In [ ]: