Exercise: Exploring E-Commerce
This lesson tests the learners on EDA on an e-commerce dataset.
We'll cover the following...
E-Commerce data
In this lesson, you are going to be tested on exploring E-commerce data. The dataset was made available on the UCI Machine Learning Repository. This is a transnational data set that contains all the transactions occurring between 01/12/2010 and 09/12/2011 for a UK-based and registered non-store online retail. We will be using a sample of it.
In the below exercise, you will be writing functions for every task. The functions will receive a dataframe df
as an input argument. Your task will be to perform the required operations to answer a question and return the answer to that.
Press + to interact
# E-commerce Data Attributes# InvoiceNo: Invoice number. Nominal, a 6-digit integral number uniquely assigned to each transaction. If this code starts with letter 'c', it indicates a cancellation.# StockCode: Product (item) code. Nominal, a 5-digit integral number uniquely assigned to each distinct product.# Description: Product (item) name. Nominal.# Quantity: The quantities of each product (item) per transaction. Numeric.# InvoiceDate: Invoice Date and time. Numeric, the day and time when each transaction was generated.# UnitPrice: Unit price. Numeric, Product price per unit in sterling.# CustomerID: Customer number. Nominal, a 5-digit integral number uniquely assigned to each customer.# Country: Country name. Nominal, the name of the country where each customer resides.# AmountSpent: Total amount of order i.e. UnitPrice * Quantity# PurchaseYear: year of purchase# PurchaseMonth: Month of purchase (1-12)# PurcahseHour: Hour of purchase (0-23)