Challenge: Categorize Groceries Based on Price

Learn how to categorize rows by using a column with continuous values with Pandas.

We'll cover the following

Problem statement

The grocery contains the prices of groceries. Based on the prices, we need to divide the groceries into three categories and label them as cheap, mid-priced, or expensive.

We’ll then calculate the average price for each category using the groupby function.

Get hands-on with 1400+ tech skills courses.