Question: how to convert csv file to json in python?
Answer: import csv and import json packages.
Create a file path to your CSV file: csvFilePath = 'csv_file_name.csv'
Create a file path to your JSON file: jsonFilePath = 'json_file_name.json'
Create an empty dictionary to store your converted JSON data: data = {}
Open and read the CSV: