Session Ready
Exercise

Multiple baskets

When performing market basket analysis in real life, you're likely going to face hundreds if not thousands of baskets and item combinations. The Online_Retail_clean dataset which is available in your workspace, contains the cleaned version with no missing data of the Online_Retail_2011_Q1 dataset. You will use this dataset to start working on a large number of baskets and figure out the average number of both total and distinct items in each basket. You will as well visualize the distributions of the number of items in the different baskets.

Instructions 1/3
undefined XP
  • 1
  • 2
  • 3
  • Create a dataset basket_size which contains for each basket both the number of total items and the number of distinct items within the basket. Print the header of the dataset.