CSV List Reader
Explore methods to read CSV data in Python, comparing list-based and dictionary-based approaches. Learn to convert CSV rows into dictionaries for flexible data handling and understand alternatives like JSON serialization relevant to object-oriented design.
Overview
The non-dictionary CSV reader produces a list of strings from each row. This is not what our TrainingData collection’s load() method expects, however.
We have two choices to meet the interface requirement for the load() method:
-
Convert the list of column values to a dictionary. ...