Sep-01-2019, 05:52 PM
The creation of the dataframe can be simplified but everything works fine for me
import pandas as pd inp = [{'c1':10, 'c2':100}, {'c1':11,'c2':110}, {'c1':12,'c2':120}] df = pd.DataFrame(inp) print(df)
Output: c1 c2
0 10 100
1 11 110
2 12 120
for index, row in df.iterrows(): #print(index) #print(row) print(row['c1'], row['c2']) print()
Output: 10 100
11 110
12 120