import pandas
k = 1
temp_data = []
data = open(read_path2,'r',errors='ignore')
for line in data:
if k>1:
temp_data.append(line.rstrip().split(','))
else:
cols = line.rstrip().split(',')
k+=1
data = pd.DataFrame(temp_data,columns=cols)
import pandas
k = 1
temp_data = []
data = open(read_path2,'r',errors='ignore')
for line in data:
if k>1:
temp_data.append(line.rstrip().split(','))
else:
cols = line.rstrip().split(',')
k+=1
data = pd.DataFrame(temp_data,columns=cols)
本文标题:python读取本身就有乱码的csv文件
本文链接:https://www.haomeiwen.com/subject/ydqadxtx.html
网友评论