This section describes the required functions that you must add to your module. You are encouraged to create additional helper functions where necessary. You must test these functions using different text files inside the main() function. The final version of your module must only contain functions and a single call to the main() function (i.e., there should not be any additional function calls or print statements outside the main() function).

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

This section describes the required functions that you must add to your module. You are
encouraged to create additional helper functions where necessary. You must test these functions
using different text files inside the main() function. The final version of your module must only
contain functions and a single call to the main() function (i.e., there should not be any additional
function calls or print statements outside the main() function).

This section describes the required functions that you must add to your module. You are
encouraged to create additional helper functions where necessary. You must test these functions
using different text files inside the main() function. The final version of your module must only
contain functions and a single call to the main() function (i.e., there should not be any additional
function calls or print statements outside the main() function).
(c) return_list() that takes the name of a csv file as the input parameter and returns a 2D list.
I will call this 2D list database in the rest of this specification, but you may rename it. Each
element of database must contain data from each row of the csv file as follows.
[Case_Reported_Date1,
[
[Case_Reported_Date2, Age_Group2, Client_Gender2, Reporting_PHU_ID2],
Client_Gender1,
Reporting_PHU_ID1],
.. ]
Age_Group1,
Note: It should not include the header row from the file. You will need to remove the 's' from
the values of the Age_Group field, you can still sto
Reporting_PHU_IDs as integers.
them
strings. You must
re the
See sample output below.
>>> database = return_list(“data10.csv")
>>> display_2Dlist(database)
['2021-05-19',
['2021-05-22', '40',
['2021-05-19',
['2021-05-20',
['2021-05-19', '70'
['2021-05-19', '<20',
['2021-05-19'.
['2021-05-20',
['2021-05-19'
['2021-05-19', '20', 'MALE', 2270]
['2021-05-21', '<20', 'FEMALE', 2253]
['2021-05-19',
'40', 'MALE', 2241]
'MALE', 2265]
'FEMALE', 2244]
'MALE', 4913]
'FEMALE', 2251]
'FEMALE', 2244]
'GENDER DIVERSE', 3895]
'MALE', 2237]
'MALE', 2268]
'60
'60',
'<20'
'<20'
'<20'
'30', 'UNSPECIFIED', 3895]
Transcribed Image Text:This section describes the required functions that you must add to your module. You are encouraged to create additional helper functions where necessary. You must test these functions using different text files inside the main() function. The final version of your module must only contain functions and a single call to the main() function (i.e., there should not be any additional function calls or print statements outside the main() function). (c) return_list() that takes the name of a csv file as the input parameter and returns a 2D list. I will call this 2D list database in the rest of this specification, but you may rename it. Each element of database must contain data from each row of the csv file as follows. [Case_Reported_Date1, [ [Case_Reported_Date2, Age_Group2, Client_Gender2, Reporting_PHU_ID2], Client_Gender1, Reporting_PHU_ID1], .. ] Age_Group1, Note: It should not include the header row from the file. You will need to remove the 's' from the values of the Age_Group field, you can still sto Reporting_PHU_IDs as integers. them strings. You must re the See sample output below. >>> database = return_list(“data10.csv") >>> display_2Dlist(database) ['2021-05-19', ['2021-05-22', '40', ['2021-05-19', ['2021-05-20', ['2021-05-19', '70' ['2021-05-19', '<20', ['2021-05-19'. ['2021-05-20', ['2021-05-19' ['2021-05-19', '20', 'MALE', 2270] ['2021-05-21', '<20', 'FEMALE', 2253] ['2021-05-19', '40', 'MALE', 2241] 'MALE', 2265] 'FEMALE', 2244] 'MALE', 4913] 'FEMALE', 2251] 'FEMALE', 2244] 'GENDER DIVERSE', 3895] 'MALE', 2237] 'MALE', 2268] '60 '60', '<20' '<20' '<20' '30', 'UNSPECIFIED', 3895]
Expert Solution
steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Knowledge Booster
Reference Types in Function
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education