Analysis of Sales Data

Data source: Klaviyo Data Scientist Exercise

In these exercises, I worked with sales data from a marketplace with several stores. The attached CSV file lists the customer, date, and dollar value of orders placed in 2017. Assume that there is only one product in each order. The store ID and product ID are also included for each ordered product. The gender of each customer is also provided.

Exercise 1

Assemble a dataframe with one row per customer and the following columns:

customer_id gender most_recent_order_date order_count (number of orders placed by this customer) Sort the dataframe by customer_id ascending and display the first 10 rows.

Exercise 2

Plot the total order count for the marketplace by week.

Exercise 3

Compute the mean order value for gender 0 and for gender 1. Do you think the difference is significant?

Exercise 4

Suppose that some of our customers told us that they believe red products are more eye-catching and therefore easier to sell. Based on the dataset provided, would you suggest that companies should color more of their products red? Why or why not and what other factors could be important to determine this?

QJ
Jan 2021