1. Learn
  2. /
  3. Courses
  4. /
  5. Experimental Design in Python

Connected

Exercise

Visualizing and testing preservation methods

As a food scientist, you're tasked with evaluating the effectiveness of different preservation methods on nutrient retention and how these methods impact shelf life. You have been provided with a dataset, food_preservation, that includes various types of food preserved by methods such as freezing and canning. Each entry in the dataset captures the nutrient retention and calculated shelf life for these foods, providing a unique opportunity to analyze the impacts of preservation techniques on food quality.

The following imports have been loaded for you in addition to food_preservation:

import pandas as pd
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
from scipy.stats import mannwhitneyu

Instructions 1/2

undefined XP
    1
    2
  • Filter the DataFrame to include only Freezing and Canning rows.
  • Create a violin plot to visualize the distribution of nutrient retention for different preservation methods.