text_plain_output_1.png
transactions = transactions[transactions['t_dat'] > '2020-09-14']
transactions.shape

all_customers = customers['customer_id'].unique().tolist()
all_articles = articles['article_id'].unique().tolist()
customer_ids = dict(list(enumerate(all_customers)))
article_ids = dict(list(enumerate(all_articles)))
transactions['customer_id'] = transactions['customer_id'].map({u: uidx for uidx, u in customer_ids.items()})
transactions['article_id'] = transactions['article_id'].map({i: iidx for iidx, i in article_ids.items()})
del customers, articles