Question: Analytical Programming Please write all the answer on paper and jovian step by step SECTION B. Instructions: Answer 1 question ONLY. Write your answers in

Analytical Programming
Please write all the answer on paper and jovian step by step
Analytical Programming Please write all the answer on paper and jovian step
by step SECTION B. Instructions: Answer 1 question ONLY. Write your answers

SECTION B. Instructions: Answer 1 question ONLY. Write your answers in the Answer Booklet. QUESTION 1 [40 Marks] a. Write a Pandas program to select the rows where the number of attempts in the examination is greater than 2 . Sample Python dictionary data and list labels: exam data = ['name': ['Anastasia', 'Dima', 'Katherine', 'James', 'Emily', 'Michael', 'Matthew', 'Laura', 'Kevin', 'Jonas'], 'score': [12.5, 9, 16.5, np.nan, 9, 20, 14.5, np.nan, 8, 19]. 'attempts': [1,3,2,3,2,3,1,1,2,1], 'qualify': [yyes', 'no', 'yes', 'no', 'no', 'yes', 'yes', no', no', 'yes']\} labels = [a', 'b', 'c', 'd', 'e', 'f,' 'g', 'h', 'i, J] Expected Output: Number of attempts in the examination is greater than 2: name score attempts qualify b Dima 9.03 no d James NaN 3 no f Michael 20.03 yes (20 marks) b. Write a Pandas program to convert a NumPy array to a Pandas series. Sample NumPy array: dl=[10,20,30,40,50] Expected Output: NumPy array: [10 2030 40 50] Converted Pandas series: 010 120 344050 450 dtype: int64 (20 marks) a. Write a Pandas program to sort the data frame first by 'name' in descending order, then by 'score' in ascending order. Sample DataFrame: exam_data = \{'name': [Anastasia', 'Dima', 'Katherine', 'James', 'Emily'], 'score': [12.5, 9, 16.5, np.nan, 9], 'attempts': [1,3,2,3,2], 'qualify': [yes', 'no', 'yes', 'no', 'no'] labels =[a, 'b, c , d ', 'e'] Values for each column will be: name : 'Suresh', score: 15.5, attempts: 1, qualify: 'yes', label: ' k

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!