I am iterating over a pandas dataframe using itertuples. I also want to capture the row number while iterating:
for row in df.itertuples():
print row['name']
Expected output :
1 larry
2 barry
3 michael
1, 2, 3 are row numbers. I want to avoid using a counter and getting the row number. Is there an easy way to achieve this using pandas?