Skip to content

Instantly share code, notes, and snippets.

@amankharwal
Created March 23, 2021 07:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amankharwal/5643f671184bbb2eb92c2e31150e068d to your computer and use it in GitHub Desktop.
Save amankharwal/5643f671184bbb2eb92c2e31150e068d to your computer and use it in GitHub Desktop.
def recommend(id):
recommend_products = recommendations
recommend_products['user_id'] = id
column = recommend_products.columns.tolist()
column = column[-1:] + column[:-1]
recommend_products = recommend_products[column]
return recommend_products
print(recommend(11))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment