1,保存成csv的格式。
date.to_csv()。
2,保存成excel文件。
date.to_excel(“F:/Windows事件数据完整版.xlsx”,index = False)
import pandas as pd
f = open("F:/Windows事件数据完整版.txt",encoding='utf8')
content = pd.read_table(f,":::",header = None) # ":::"表示txt文档数据字段是以:::分隔,如:端口:::事件名称:::事件描述
content.to_excel("F:/Windows事件数据完整版.xlsx",index = False)