return_dict() that takes the name of a CSV file as the input parameter and returns a dictionary, where each key is the Reporting_PHU_ID and the value is a list containing the following data. name of CSV file is "data23.csv"

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter12: Points, Classes, Virtual Functions And Abstract Classes
Section: Chapter Questions
Problem 17SA
icon
Related questions
Question

return_dict() that takes the name of a CSV file as the input parameter and returns a dictionary, where each key is the Reporting_PHU_ID and the value is a list containing the following data.

name of CSV file is "data23.csv"

See a sample output below.
>> dict = return_dict(database)
>>> dict = return_dict("data1le.csv")
>>> display_dict(dict)
2237:
['Hamilton
Public
Health
Services',
'Hamilton',
"L8P
456',
'www.hamilton.ca/publichealth', '43.3', '-79.9']
2241: ['Kingston Frontenac and Lennox & Addington Public Health', 'Kingston', 'K7M
1V5', 'www.kflaph.ca', '44.2', '-76.5']
2244: ['Middlesex-London Health Unit', 'London', 'N6A SL7', 'www.healthunit.com',
'43.0', '-81.3']
2251: ['Ottawa Public Health', 'ottawa', 'K2G 6J8', 'www.ottawapublichealth.ca',
'45.3', '-75.8']
2253:
['Peel
Public
Health',
"Mississauga',
'L5W
1N4',
'www.peelregion.ca/health/', '43.6', '-79.7']
2265: ['"Region of Waterloo',
'www.regionofwaterloo.ca', '43.5']
2268: ['Windsor-Essex County Health Unit', 'Windsor', 'N9A 4J8', 'www.wechu.org',
'42.3', '-83.0']
Public Health"',
"Waterloo',
'N2J
4V3',
Services',
'Newmarket',
-79.5']
2270:
['York Region
Public
Health
'L3Y 621',
"www.york.ca/wps/portal/yorkhome/health/', '44.0',
3895: ['Toronto Public Health',
people/health-wellness-care/', '43.7', -79.4']
'Toronto'
'M5B 1W2', 'www.toronto.ca/community-
4913:
['Southwestern
Public
Health',
"St.
Thomas',
'NSP
169',
'www.swpublichealth.ca', '42.8', '-81.2']
Transcribed Image Text:See a sample output below. >> dict = return_dict(database) >>> dict = return_dict("data1le.csv") >>> display_dict(dict) 2237: ['Hamilton Public Health Services', 'Hamilton', "L8P 456', 'www.hamilton.ca/publichealth', '43.3', '-79.9'] 2241: ['Kingston Frontenac and Lennox & Addington Public Health', 'Kingston', 'K7M 1V5', 'www.kflaph.ca', '44.2', '-76.5'] 2244: ['Middlesex-London Health Unit', 'London', 'N6A SL7', 'www.healthunit.com', '43.0', '-81.3'] 2251: ['Ottawa Public Health', 'ottawa', 'K2G 6J8', 'www.ottawapublichealth.ca', '45.3', '-75.8'] 2253: ['Peel Public Health', "Mississauga', 'L5W 1N4', 'www.peelregion.ca/health/', '43.6', '-79.7'] 2265: ['"Region of Waterloo', 'www.regionofwaterloo.ca', '43.5'] 2268: ['Windsor-Essex County Health Unit', 'Windsor', 'N9A 4J8', 'www.wechu.org', '42.3', '-83.0'] Public Health"', "Waterloo', 'N2J 4V3', Services', 'Newmarket', -79.5'] 2270: ['York Region Public Health 'L3Y 621', "www.york.ca/wps/portal/yorkhome/health/', '44.0', 3895: ['Toronto Public Health', people/health-wellness-care/', '43.7', -79.4'] 'Toronto' 'M5B 1W2', 'www.toronto.ca/community- 4913: ['Southwestern Public Health', "St. Thomas', 'NSP 169', 'www.swpublichealth.ca', '42.8', '-81.2']
Expert Solution
steps

Step by step

Solved in 2 steps with 3 images

Blurred answer
Knowledge Booster
Operations of Linked List
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
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning