This is the printout I get when I remove the if statement. I am trying to match user input (racenumber0 with the 2nd column in the dataframe, with the code in above post.
[['AP ' 1 'D' ... 42 3.0 'EYE ON THE FINISH']
['AP ' 1 'D' ... 46 10.0 'GODSGIFT']
['AP ' 1 'D' ... 82 8.0 'LILLET']
...
['AP ' 8 'D' ... 35 6.0 'WILDCAT LITE']
['AP ' 8 'D' ... 46 15.0 'GREELEYS ICE']
['AP ' 8 'D' ... 29 12.0 'JIVE DADDY']]
This was the code I changed and it worked. I am amazed...LOl.
[['AP ' 1 'D' ... 42 3.0 'EYE ON THE FINISH']
['AP ' 1 'D' ... 46 10.0 'GODSGIFT']
['AP ' 1 'D' ... 82 8.0 'LILLET']
...
['AP ' 8 'D' ... 35 6.0 'WILDCAT LITE']
['AP ' 8 'D' ... 46 15.0 'GREELEYS ICE']
['AP ' 8 'D' ... 29 12.0 'JIVE DADDY']]
This was the code I changed and it worked. I am amazed...LOl.
for i in range(0,len(xx)): if int(xx[hcount][1])== int(race_number): print(xx[hcount][18]) hcount+=1