Challenge: Find the Weekly Sales Quantities
Learn how to use the groupby function of Pandas for data analysis.
We'll cover the following
Problem statement
This challenge involves using some techniques that we’ve learned in previous lessons. The objective is to find the total sales in each week and sort the results by total sales in descending order. We first need to create a week
column by extracting the week information from the sales_date
column. Then, the week
column will be used in the groupby
function. Let’s also recall how the grocery
looks by executing the following code.
Get hands-on with 1400+ tech skills courses.