There's a bug in my code

https://gist.github.com/edb4324ad4096614f78c29820afdc8a3

Hi I’m not sure where I’ve made a mistake but when I print(transactions_clean) on the last line of the code the computer is printing everything 4 times. I assume I made a mistake with a for loop but i don’t see the mistake and I’ve looked at it several times. I’ve also checked the walk through.

Hello! This is because there are four data_points in transaction. This makes the loop Screen Shot 2020-09-13 at 07.17.37
loop four times.

3 Likes

Thanks I get it now. I had transactions_clean.append(t-Clean) indented too much. Once i aligned it with “for” it worked.

2 Likes