Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Question 3 (30 points): data Analysis of a field study John has done a field stu

ID: 3915891 • Letter: Q

Question

Question 3 (30 points): data Analysis of a field study

John has done a field study and the result is saved in Employment.csv file. The stufy is about employment and type of

employment of each graduated students from college in different majors. He needs some help with data analysis

Question 3.a (3 points):

Help John to read the file using Pandas

In [272]:

Question 3.b (5 points):

Help him to find the null values and put them 0 wherever there is a null value

In [ ]:

Question 3.c (3 points):

John does not know the total number of participants, but he has the data of male and female participants

Generate a new column that shows total number of participants in the field study based on each major.

The name of the coloum is total.

In [269]:

Question 3.d (5 points):

He wants to have % of female participants for each major

Generate another new column that shows % of the female students participant in the feild study based on each major.

The name of the coloum is WomenShare

In [268]:

Questions 3.e: (3 points).

Find the number of students that do not have college_jobs in each major.

Show the result as a new column 'non_college_jobs'

In [ ]:

Questions 3.f: (8 points).

Find the % of the unemployed students in each major.

In [270]:

Question 3.g (3 points):

Save all result in a csv file called FinalResult.csv

In [ ]:

Question 3.h (Extra credit: 2 points)

Find total of students based on major_category and show them in a pie chart

Check the last part of the HW4 :-)

In [264]:

In [267]:

Explanation / Answer

3.a)

read_csv() function is used to read a csv file.

3.b)

fillna() function would replace all the null values with 0.

3.c)

3.d)

3.e)

3.f)

We have created the total column, so when we subtract employed from the total, then we get the no of unemployed and it is divided by total and multiplied by 100 to convert in percentage form.

3.g)

to_csv() function is used for this purpose.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote