Question: please help with this question You are working on an API in python that will be used by a web app and will also be


You are working on an API in python that will be used by a web app and will also be used by other people in your organization. One of the endpoint accepts GET requests and should return a list of teachers and each teacher should contain a list of students ........see the desired outcome below under "The desired outcome" The data Initially, you have 2 dataframes in python, (you have no control of where this data comes from), a teachers dataframe I I and a students dataframe Create these dataframes in python as follows: import pandas as pd udependency import numpy as np "dependency df_teacher = pd. DataFrame {{ "name": ["Pep Guardiola", "Jurgen Klopp", "mikel Arteta", "zinadine Zidane"], "married": [True, True, False, True], Do not alter the original dataframe for the final solution. feel free to create a copy and then you alter that one for any debugging you need You will obviously need pandas and numpy. You can use any other BUILT IN python libraries to solve the solution... Try not to use any other 3rd party libraries besides pandas and python. PART A Write python code to produce the following output using the above dataframes. "teacher": "Jurgen klopp", "schoot": "Liverpool High Schoot". "itarried"1 true, "Students t I. "student", "Pioberto Firmino", "age": 31.e, "height" n2.1m "student": "Andrew Rabertson", "age" 28.6, "hetght" = "2,1n" "student": "Danin Munez", "age" : 23. e. "height" + m2. 1m J "teacher"t "Mikel Arteta", "school"+ "Arsenal High". "married" false, "Students"t. I. I. "student": "Bukayo 5aka", "agen : 21.0, "helght": "2.1n" "stident" " "Gabriel Martineliz". "age": 21.0, "height" t " "2.1n" "student": "Thonas Partey", "age" =29.0. "height" 1 "2.1n" f. "teacher"t "pep cuardiota", "school"; "Hanchester High Schoot", "narried": true, "Students
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
