Skip to content

Instantly share code, notes, and snippets.

@prateekjoshi565
Created July 28, 2019 18:24
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 prateekjoshi565/71df8f0a3d34103a4202017dd45eda3c to your computer and use it in GitHub Desktop.
Save prateekjoshi565/71df8f0a3d34103a4202017dd45eda3c to your computer and use it in GitHub Desktop.
# list to capture purchase history of the customers
purchases_train = []
# populate the list with the product codes
for i in tqdm(customers_train):
temp = train_df[train_df["CustomerID"] == i]["StockCode"].tolist()
purchases_train.append(temp)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment