Question: Consider the MAJOR data frame. a . Create a for loop that calculate the percentage employed out of the total. The output should be a

Consider the MAJOR data frame.
a. Create a for loop that calculate the percentage employed out of the total. The
output should be a saved as a new column in the MAJOR data frame as
`employ_forloop`. Print the majors only for the 10 highest employment rates.
b. Create a for loop that goes through each major and labels the major as "Highly
Popular", "Popular", "Less Popular" based on the Total column. Save the output in a
variable called `popular`. Print all majors with the label "Less Popular". The cut offs
for each label are as follows:
i. "Highly Popular" >=300,000
ii. "Popular" =5,500-300,000
iii. "Less Popular" =<5,500

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 Programming Questions!