You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was checking out the movie recommendation code and found out that if the movie_user_likes should match the exact title of the movie or else it gives the following error.. Ok the movie title being strict is alright but it is also case sensitive... for example if i give "the avengers" it will still give the following error.
Traceback (most recent call last):
File "d:/Documents/8sem/Project Phase II/contentbased.py", line 47, in
movie_index = get_index_from_title(movie_user_likes)
File "d:/Documents/8sem/Project Phase II/contentbased.py", line 10, in get_index_from_title
return df[df.title == title]["index"].values[0]
IndexError: index 0 is out of bounds for axis 0 with size 0
so i tried turning the user data into camel case but then again it will show the same error cause the preposition in the title are small case.. I'm pretty much stuck here... I would be thankful to someone who can show me a way around it.. I'm open for new ideas... PLEASE HELP
The text was updated successfully, but these errors were encountered:
I was checking out the movie recommendation code and found out that if the movie_user_likes should match the exact title of the movie or else it gives the following error.. Ok the movie title being strict is alright but it is also case sensitive... for example if i give "the avengers" it will still give the following error.
Traceback (most recent call last):
File "d:/Documents/8sem/Project Phase II/contentbased.py", line 47, in
movie_index = get_index_from_title(movie_user_likes)
File "d:/Documents/8sem/Project Phase II/contentbased.py", line 10, in get_index_from_title
return df[df.title == title]["index"].values[0]
IndexError: index 0 is out of bounds for axis 0 with size 0
so i tried turning the user data into camel case but then again it will show the same error cause the preposition in the title are small case.. I'm pretty much stuck here... I would be thankful to someone who can show me a way around it.. I'm open for new ideas... PLEASE HELP
So you can do one thing concert every movie name in the dataset tolower and in function also convert the input to all lower letter.That way user input would not be case sensitive
I was checking out the movie recommendation code and found out that if the movie_user_likes should match the exact title of the movie or else it gives the following error.. Ok the movie title being strict is alright but it is also case sensitive... for example if i give "the avengers" it will still give the following error.
Traceback (most recent call last):
File "d:/Documents/8sem/Project Phase II/contentbased.py", line 47, in
movie_index = get_index_from_title(movie_user_likes)
File "d:/Documents/8sem/Project Phase II/contentbased.py", line 10, in get_index_from_title
return df[df.title == title]["index"].values[0]
IndexError: index 0 is out of bounds for axis 0 with size 0
so i tried turning the user data into camel case but then again it will show the same error cause the preposition in the title are small case.. I'm pretty much stuck here... I would be thankful to someone who can show me a way around it.. I'm open for new ideas... PLEASE HELP
The text was updated successfully, but these errors were encountered: