Python – Convert CSV to List of Dictionaries
Convert a CSV file to a list of Python dictionaries in three steps: Create a CSV file object f using open(“my_file.csv”) and pass it in the csv.DictReader(f) method. The return value is an iterable of dictionaries, one per row in the CSV file. Each dictionary maps the column header from the first row to the … Read more