import pathlib import csv path = pathlib.Path("nombres.csv") with path.open() as file: csv_file = csv.DictReader(file) for renglon in csv_file: print(renglon["Nombre"], renglon["Edad"])