counter = 0
for i in range(len(df)):
print[df.loc[i, "Emotional State"]]
if i in ["Happy"]:
counter+=1
print(['counter: ', counter]
The print results is: b'Happy' and the data in the dataset is "Happy" no spaces etc. For some reason i is never equal to Happy, which is not possible as it will be the first iteration. Any ideas why the output is not matching the if statement or data in the frame? The counter is always 0
1 in ['Happy']? ;)