import csvmydict = {('c4:7d:4f:53:24:be', 'ac:81:12:62:91:df'): [5.998999999999998, 0.0013169999, 4.0000000000000972], ('a8:5b:4f:2e:fe:09', 'de:62:ef:4e:21:de'): [7.89899999, 0.15647999999675390, 8.764380000972, 9.200000000]}with open('dict.csv', 'wb') as file: writer = csv.writer(file, delimiter='t') writer.writerow(mydict.keys()) for row in zip(*mydict.values()): writer.writerow(list(row))
输出文件dict.csv:
('c4:7d:4f:53:24:be', 'ac:81:12:62:91:df') ('a8:5b:4f:2e:fe:09', 'de:62:ef:4e:21:de')5.998999999999998 7.898999990.0013169999 0.15647999999675394.000000000000097 8.764380000972
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)