total = test_set.shape for row in test_set.iterrows(): row = row if row['Label'] == row['predicted']: correct += 1
Hi, I fully understand pretty much everything that is going on here. I am just slightly confused with regards to the line:
“row = row”
At first I ran my code without this line and it did not work. I was wondering what this line of code does in terms of the iteration and why it is necessary? I also don’t fully understand how we could use this notation as it refers to a specific row doesn’t it? I think I am missing something
Is it possibly because we are not wanting to include the row with the column titles?
Thanks in advance!