looping a simple dataframe python code example Example: iterrrows for index, row in flights.head(n=2).iterrows(): print(index, row)