Guest User

Untitled

a guest
May 23rd, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. def get_index_from_dvdid(dvdid):
  2. return df[df["dvdid"]==dvdid].index.tolist()[0]
  3.  
  4. def print_similar_dvds(query=None):
  5. if query:
  6. found_id = get_index_from_dvdid(query)
  7. for id in indices[found_id][1:]:
  8. print(df.loc[id]["dvdid"])
Add Comment
Please, Sign In to add comment