Price per calorie of various snack foods


Suppose you are given the following dataset containing food, servings per container, calories per serving, and price per container. You'll notice that each food's price, serving size, and servings per container widely varies. Create a sorted list (lowest to highest) with the food and the associated price per calorie. Below is code to generate the dataframe, or you can also make a copy of this Google Colab notebook to get started.

# code to import data
import pandas as pd
df = pd.read_csv('')
# preview data


Access restricted

Subscribe to premium account to see the solution.

Get premium now