嗨,我有一本字典,里面有一个索引,看起来是这样的:
{'url' : [ 'malware.com ', 'hack.net ', 'paypalz.org' ] 'IP' ['104.223.89.166' , 104.223.89.136] 'emailIdentifier' : ['liler@bikurcholim.net']}
我需要将其转换为csv,其中键是列,值是行。我试图在stackoverflow中找到解决这个问题的方法,但没有找到。有什么建议怎么做吗?你知道吗
谢谢
with open('\\cybernet\\cyber_indicators.csv', 'w') as csv_file:
writer = csv.writer(csv_file)
dict_writer = csv.DictWriter(csv_file, keys)
for key, value in dictionary.items():
writer.writerow([key, value])
你知道吗数据.csv你知道吗
相关问题 更多 >
编程相关推荐