直接贴代码啦:
#coding=utf-8
import pandas as pd
def arff_to_csv(fpath):
#读取arff数据
if fpath.find('.arff') <0:
print('the file is nott .arff file')
return
f = open(fpath)
lines = f.readlines()
content = []
for l in lines:
content.append(l)
datas = []
for c