I have a Dataframe of 50 columns and 2000+ rows of data. I basically want to go through each column row by row and check if the value in the column becomes greater than 10 BEFORE it becomes less than -10. If so, iterate a counter and goto the next column.
for row in data2.transpose().iterrows():
if row > 10:
countTP = countTP + 1
break
if row < -10:
countSL = countSL + 1
break
print countTP, countSL
Out: 1 0
At least half the columns should have iterated the counter (I believe the answer should be 35 15) Appreciate any help!