We have multiple options to do the same, and lots of folks have shared their answers.
I found the below two methods easy and efficient to do :
Example:
import pandas as pd
inp = [{'c1':10, 'c2':100}, {'c1':11,'c2':110}, {'c1':12,'c2':120}]
df = pd.DataFrame(inp)
print (df)
#With# With the iterrows method
for index, row in df.iterrows():
print(row["c1"], row["c2"])
#With# With the itertuples method
for row in df.itertuples(index=True, name='Pandas'):
print(row.c1, row.c2)
Note: itertuples() is supposed to be faster than iterrows()