Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strick title name #5

Open
shnkreddy98 opened this issue Apr 2, 2020 · 1 comment
Open

Strick title name #5

shnkreddy98 opened this issue Apr 2, 2020 · 1 comment

Comments

@shnkreddy98
Copy link

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

@jayesh1147
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants