Jessime / youtube_history

A quick analysis of all Youtube videos in a user's history.
MIT License
83 stars 4 forks source link

Positional Indexers are out of bounds #13

Open tyler3490 opened 2 years ago

tyler3490 commented 2 years ago

I am getting an error with the dataframe iloc that is looking for the max and min values in the average ratings. It is saying that the positional Indexers are out of bounds for the .iloc. image

tyler3490 commented 2 years ago

This is happening no matter what the data is, large or small, on mac and pc. I commented out the best_and_worst_videos functionality and took the corresponding stuff out of the index.html template and at least got something to display.

tyler3490 commented 2 years ago

image

tyler3490 commented 2 years ago

I realized I never uploaded the problematic portion of code, line 284 is where the issue is. image

When I print out the grouped['average_rating'].idxmax() its gives me the expected 10 items but they are all NaN image

I suspect the iloc function then doesn't know what to index if all the values are the same.

Have you ever run into this issue? could I not have enough data? I am using a dataset with ~800 entries and another with ~20