Skip to content

Instantly share code, notes, and snippets.

@amankharwal
Created Apr 1, 2021
Embed
What would you like to do?
def recommend_ted_talks(x):
return ".".join(data["title"].loc[x.argsort()[-5:-1]])
data["ted_talks_uni"] = [recommend_ted_talks(x) for x in uni_sim]
data["ted_talks_bi"] = [recommend_ted_talks(x) for x in bi_sim]
print(data['ted_talks_uni'].str.replace("_", " ").str.upper().str.strip().str.split("\n")[1])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment