Get stuck in Roller Coaster Project (pandas)

Hi. I 'm working in part 5 (the function top_n) and got an value error. How can I solve the problem in my for loops?

ValueError: x and y must have same first dimension, but have shapes (18,) and (6,)

https://www.codecademy.com/practice/projects/roller-coaster
https://gist.github.com/0755b538c6a96f9652a3698281376997