Sep-01-2019, 05:38 PM
Hello,
I tried to loop through pandas data frame.
However I receive an error message.
with a code like this:
one error is unexpected EOF while parsing,
another is row is not define.
Please advise or does someone have a working example of how to loop through a pandas data frame ?
I tried to loop through pandas data frame.
However I receive an error message.
with a code like this:
one error is unexpected EOF while parsing,
another is row is not define.
Please advise or does someone have a working example of how to loop through a pandas data frame ?
inp = pd.DataFrame([{'c1':10, 'c2':100}, {'c1':11,'c2':110}, {'c1':12,'c2':120}]) df = pd.DataFrame(inp) print (df) for index, row in df.iterrows(): print(row['c1'], row['c2'])