Solution: Plotting
Explore ways to visualize DataFrame data using bar charts, stacked bars, and histograms with pandas. Learn to plot Lifespan and Speed metrics as well as age distributions, and save your visualizations as image files for easy display and sharing.
We'll cover the following...
We'll cover the following...
Solution 1
Given the following DataFrame df:
Snail Cat Dog Elephant Rabbit Horse CheetahLifespan 2 12 10 50 9 25 10Speed 0.1 45 45 40 50 55 100
a) Create a bar plot of the entire DataFrame, showing both Lifespan and Speed for each animal.
b) Create a stacked bar plot of the same DataFrame. ...