Section 1. Chapter 8
single
Challenge: Segment Customers and Summarize Spend
Swipe to show menu
Task
Swipe to start coding
Create a function that organizes customer data into segments and summarizes their spending.
- Use the provided data to create a DataFrame with customer IDs, segment labels, and spend amounts.
- Group the data by the
segmentcolumn. - Calculate the average spend for each segment.
- Output a summary showing the average spend per segment.
Solution
Everything was clear?
Thanks for your feedback!
Section 1. Chapter 8
single
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat