Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Given that the academic - staff salaries dataset, which is stored as Salaries . csv file. The dataset is Given that the academic

Given that the academic-staff salaries dataset, which is stored as"Salaries.csv" file. The dataset is Given that the academic-staff salaries dataset, which is stored as"Salaries.csv" file. The dataset is
located on the Google Drive and contained inside:
My Drive/datasets/csV
The 1st line looks like:
rank, discipline, phd,service, sex,salary
Prof, B,56,49,Male, 186960
The dataset looks like
Answer the following questions:
A) Write the code necessary to load the file into a DataFrame sal_df (include all
steps)?
B) Write the code necessary to create a subset DataFrame for the column rank? Answer the following questions:
A) Write the code necessary to load the file into a DataFrame sal_df (include all
steps)?
B) Write the code necessary to create a subset DataFrame for the column rank?
C) Make a copy from the sal_df above, then write the steps necessary to drop Missing
values from the DataFrame?
D) In one line of code, find the max salary for each professor rank?
located on the Google Drive and contained inside:
My Drive/datasets/csv
The 1st line looks like:
rank, discipline, phd, service, sex, salary
Prof, B,56,49, Male, 186960
The dataset looks like
rank discipline phd service
0 AssocProf
1
Prof
2
Prof
3
Prof
4 AsstProf
5
Prof
6
Prof
7 AssocProf
8 AsstProf
9 AsstProf
10
Prof
11
Prof
12
AsstProf
13 AssocProf
14
Prof
B
B
12
28
45
20
4
18
13
23
25
11
11
17
sex
salary
Male 119800.0
23
45
Male 126933.0
Male 146856.0
8 Male 102000.0
3 Male 91000.0
18 Female 129000.0
36 Female 137000.0
8 Female 74830.0
2 Female 80225.0
0 Female 77000.0
19 Female 151768.0
25 Female 140096.0
3 Female 74692.0
11 Female 103613.0
17 Female
NaN
Answer the following questions:
A) Write the code necessary to load the file into a DataFrame sal_df (include all steps)?
B) Write the code necessary to create a subset DataFrame for the column rank?
C) Make a copy from the sal_df above, then write the steps necessary to drop Missing values from the DataFrame?
D) In one line of code, find the max salary for eachprofessorrank?
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Management System MCQs Multiple Choice Questions And Answers

Authors: Arshad Iqbal

1st Edition

1073328554, 978-1073328550

More Books

Students also viewed these Databases questions