datacamp-data-analyst-with-python
datacamp-data-analyst-with-python copied to clipboard
Price of conventional vs. organic avocados
The Correct code for this exercise is
Histogram of conventional avg_price
avocados[avocados["type"] == "conventional"]["avg_price"].hist()
Histogram of organic avg_price
avocados[avocados["type"] == "organic"]["avg_price"].hist()
Add a legend
plt.legend(["conventional", "organic"])
Show the plot
plt.show()