pandas方式遍历日志文件

import pandas as pd
import csv



f = open(r'C:/Users/will/Desktop/log-2023-05-22.log',encoding='utf-8')

data = pd.read_csv(f,sep='\n',header=None)


for indexs in data.index:
    print(data.loc[indexs].values)

  

posted @ 2023-05-22 18:11  Oops!#  阅读(31)  评论(0编辑  收藏  举报