Session Ready
Exercise

Single basket

In the following exercises, you will be working with a dataset containing transactions of an e-commerce retail company based in the UK. These transactions consist of all transactions in the first quarter of 2011.

You will in particular have a closer look at a single basket from this dataset. It will be your turn to figure out the total basket size and the number of distinct products.

The dataset called Online_Retail_2011_Q1 is available in your workspace. Some important columns of the dataset are:

  • StockCode: number uniquely assigned to each distinct product;
  • InvoiceNo: number uniquely assigned to each transaction;
  • Description: description of the product;
  • Quantity: quantity purchased per transaction.
Instructions 1/3
undefined XP
  • 1
  • 2
  • 3
  • After having a glimpse at the dataset, create a single basket for the Invoice Number 540180 and print it.