Skip to content

Instantly share code, notes, and snippets.

@amankharwal
Created January 17, 2021 09:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save amankharwal/4b2fb737e6aadb2ee3a9b82dab0bd3a6 to your computer and use it in GitHub Desktop.
Save amankharwal/4b2fb737e6aadb2ee3a9b82dab0bd3a6 to your computer and use it in GitHub Desktop.
def BookRecommender(book_name):
book_list_name = []
book_id = df2[df2['title'] == book_name].index
book_id = book_id[0]
for newid in idlist[book_id]:
book_list_name.append(df2.loc[newid].title)
return book_list_name
BookNames = BookRecommender('Harry Potter and the Half-Blood Prince (Harry Potter #6)')
BookNames
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment