Section 1. Chapter 2
single
Challenge: Generate Regional Sales Report
Swipe to show menu
Task
Swipe to start coding
Create a function that generates a summary of total sales for each region from a sample sales dataset.
- Create a pandas DataFrame with columns "region" and "sales", using at least three unique region values and several sales amounts.
- Group the DataFrame by the "region" column.
- Calculate the total sales for each region.
- Print the resulting summary table.
Solution
Everything was clear?
Thanks for your feedback!
Section 1. Chapter 2
single
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat