Reading Csv As Dictionary (Csv.Dictreader)
Mon 10 August 2026
import csv
with open("data.csv", "r") as file:
reader = csv.DictReader(file)
for row in reader:
print(row["name"], row["age"])
Score: 5
Category: chapter11_csv_handling
import csv
with open("data.csv", "r") as file:
reader = csv.DictReader(file)
for row in reader:
print(row["name"], row["age"])
Score: 5
Category: chapter11_csv_handling