import pandas as pd

namesList = [{'FirstName':"Bob",     'LastName': "Smith"},
             {'FirstName':"Rusty",   'LastName': "Jones"},
             {'FirstName': "Tanner", 'LastName': "Golden"},
             {'FirstName': "Harry",   'LastName': "Chinook"}
             ]
df = pd.DataFrame(namesList)
print(df)

# Access data row wise using iterrows()
print(" ========== Row wise data =========")
for (row_index,row_value) in df.iterrows():
    print("\n Row index is :",row_index)
    print("\n Row Value is: ",row_value)

print("\n")
# Access data row wise using iterrows()
print(" ========== Column wise data =========")
#for (col_index,col_value) in df.iteritems():
for (col_index, col_value) in df.items() :
    print("\n Col index is :",col_index)
    print("\n Col Value is: ",col_value)
