Get startedGet started for free

Price of conventional vs. organic avocados

Creating multiple plots for different subsets of data allows you to compare groups. In this exercise, you'll create multiple histograms to compare the prices of conventional and organic avocados.

matplotlib.pyplot has been imported as plt and pandas has been imported as pd.

This exercise is part of the course

Data Manipulation with pandas

View Course

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# Histogram of conventional avg_price 
avocados[____][____].____

# Histogram of organic avg_price
avocados[____][____].____

# Add a legend
plt.legend(____)

# Show the plot
____
Edit and Run Code