Page 1 of 1

Question 9 2 pts Given the following Python code: import pandas as pd a = pd.read_csv ("appointments.csv") b = pd.read_c

Posted: Mon Jun 06, 2022 5:56 pm
by answerhappygod
Question 9 2 Pts Given The Following Python Code Import Pandas As Pd A Pd Read Csv Appointments Csv B Pd Read C 1
Question 9 2 Pts Given The Following Python Code Import Pandas As Pd A Pd Read Csv Appointments Csv B Pd Read C 1 (41.4 KiB) Viewed 25 times
Question 9 2 pts Given the following Python code: import pandas as pd a = pd.read_csv ("appointments.csv") b = pd.read_csv ("medical centres.csv") c = pd.merge(a, b, how='inner', on='cid') c[ c['centre'] == 'Sydney Medical Centre'] smc.sort_values (by=['date'], ascending=False) smc = Assume the input CSV data would have been stored in relational tables of the same schema. What would be an equivalent SQL query producing the same output than the given Python/Pandas code?

SELECT cid FROM Appointments MERGE MedicalCentres WHERE centre='Sydney Medical Centre' * SELECT FROM Appointments INNER JOIN Medical Centres ON (cid) ORDER BY date DESC * SELECT FROM Appointments NATURAL JOIN Medical Centres WHERE centre='Sydney Medical Centre' ORDER BY date ASC SELECT centre FROM Appointments INNER JOIN Medical Centres USING (cid) WHERE 'centre' = 'Sydney Medical Centre' SORT BY date ASC SELECT * FROM Appointments NATURAL JOIN Medical Centres WHERE centre='Sydney Medical Centre' ORDER BY date DESC