from tkinter import * from PIL import Image import csv filename = "from_to_proportions.csv" with open(filename) as csvfile: dialect=csv.Sniffer().sniff(csvfile.read(1024)) csvfile.seek(0) print(dialect) readed = csv.DictReader(csvfile, dialect) for row in readed: print(row) print (row["from_id"],row["from_name"],row['to_id'],row['to_name'], row['barcodes_percentage'],row['rows_to_be'])