Write dict to csv with integers as keys

I have a dict with epoch times as keys. It looks like this: my_dict = {199934234: "val1", 1999234234: "val2"} When trying to write it to a csv, I get the error "iterable expected, not int". There is no problem, however, when using regular keys. import csv with open(‘my_file.csv’, ‘w’, newline=”) as csvfile: writer = csv.writer(csvfile)… Read More Write dict to csv with integers as keys