Python: csv.DictReader(csvfile), for loop

Display CSV data as a Python dictionary

nick3499
1 min readJun 24, 2017
import_csv_dict_data.py displayed by Atom text IDE

import csv includes functions for manipulating CSV data, reducing the size of the Python script example above. An open, read-only object was assigned to csvfile which contains the CSV data. And which the for loop iterates through row by row. To convert from Python 2 to Python 3, simply change print row to print(row).

--

--

nick3499
nick3499

Written by nick3499

coder of JavaScript and Python

No responses yet