I was doing an exercise but the results were wrong in my computer. I was confident the code was the same as in the exercise, so I uploaded it to Kaggle and, sure enough, the res