I have a dataframe similar to below,
Date A B
2017-01-01 1 1
2017-01-02 2 2
2017-01-03 1 2
For each column, I want to test the condition A==B for each name in the groupby statement. If this condition does not hold true, I want to print "Condition ends at 2017-01-03." I'm not sure how to loop through each row in this dataframe. I'm envisioning something like this code, although I know I am not itterating through the correct thing:
for i in df.Date:
if df.A == df.B:
continue
if df.A != df.B:
print ("Condition ends at", i)