Question: L-11 Exercise 1 Create a horizontal bar chart that compares the deadliest actors in Hollywood. Sort the actors by their kill count and label each

L-11

Exercise 1

Create a horizontal bar chart that compares the deadliest actors in Hollywood. Sort the actors by their kill count and label each bar with the corresponding actor's name.

Don't forget to label your axes!

For reference, here's how to import the raw data:

hollywood_actor_kills = pd.read_csv('actor_kill_counts.csv') actor_names = hollywood_actor_kills['Actor'].values kill_counts = hollywood_actor_kills['Count'].values

Exercise 2

Create a scatter plot showing the relationship between the total revenue earned by arcades and the number of Computer Science PhDs awarded in the U.S. between 2000 and 2009.

Don't forget to label your axes!

Bonus: Color each dot according to its year.

import pandas as pd arcade_revenue_cs_doctorates = pd.read_csv('arcade-revenue-vs-cs-doctorates.csv') arcade_revenue = arcade_revenue_cs_doctorates['Total Arcade Revenue (billions)'].values cs_doctorates_awarded = arcade_revenue_cs_doctorates[ 'Computer Science Doctorates Awarded (US)'].values

Exercise 3

Create a histogram showing the distribution of the Roman Emperor's reign lengths.

What does this distribution tell you?

import pandas as pd roman_emperors = pd.read_csv('roman-emperor-reigns.csv') roman_emperor_reign_lengths = roman_emperors['Length_of_Reign'].values

Exercise 4

Create two box plots to compare the earnings of recent college graduates in majors that are primarily composed of women to the earnings of recent college graduates in majors that are primarily composed of men.

Does there appear to be a significant difference? (Hint: Use notches.)

Remember to label the categories!

import pandas as pd college_major_earnings = pd.read_csv('recent-college-grads-earnings.csv') more_men_earnings = college_major_earnings[ college_major_earnings['ShareWomen'] < 0.5]['Median'].values more_women_earnings = college_major_earnings[ college_major_earnings['ShareWomen'] > 0.5]['Median'].values

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!