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)