Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please answer 2-4 [77]= profs qroupedeprofs, qroup(rank, nax) profin grouped ap_max-prof , where(' gross_8atary',312211), colunn( nane' ),1tea(0) ans pax-profs + where ( grosi_salary, ,33764). column

please answer 2-4
image text in transcribed
image text in transcribed
image text in transcribed
[77]= profs qroupedeprofs, qroup("rank", nax) profin grouped ap_max-prof , where(' gross_8atary',312211), colunn( nane' ),1tea(0) ans pax-profs + where ( grosi_salary, ,33764). column ( name "). ften(0) 1 lec maxiprof , where (' 9 rosi salary,, 273800 ), column ('nate' . iten(0) prof_nax-profa where ' grose_salary', 507589 ), column ('nama'). iten (0) name_array-nake_array (ap_max, aso_max, lec_max, prof_max) highestmfable () .with_columa("Mane", nane_array) -with_column("Rank", profs_grouped.columin(Q)), with_columnf" Gzosa Salary" if thighest.with_eoluma " Gross salary", profs, column(3)) hitinest. Question 2. Using a combination of group. celect, np.mean ; and relabo1, ereate this table. Question 3. Set departaent_ranges to a table containing departments as the rows, and the position as the columns. The values in the rows should correspond to a salary range, where range is defined as the difference between the highest salary and the lowest salary in the departinent for that position. Hint: First we wil define a custom function range which takes in an array and retums the range idiference between minimum and maxmumb of the numbers in that array. Define a custom range firat def range(array)i Compuces ditf between max and min in array: diff =npmax(array)npnin(array) return dift Question 3. Set department_ranges to a table containing departments as the rows, and the position as the columns. The values in the rows should correspond to a salary range, where range is defined as the difference between the highest salary and the lowest salary in the department for that position. Hint: First we will define a custom function range which takes in an array and returns the range (difference between minimum and maximum) of the numbers in that array. Define a custom range first def range(array) Computes diff between max and ain in array dift = np,max(array) np.min(array) return dift department_ranges = department_ranges Question 4. Give an explanation as to why some of the row values are 0 in the department_ ranges table from the previous quastion. Write your answer here, replocing this text. 3. Which department gets paid the most

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

Fundamentals Of Database System

Authors: Elmasri Ramez And Navathe Shamkant

7th Edition

978-9332582705

More Books

Students also viewed these Databases questions

Question

What forms do the animistic activities take:

Answered: 1 week ago

Question

2. To compare the costs of alternative training programs.

Answered: 1 week ago

Question

1. The evaluation results can be used to change the program.

Answered: 1 week ago