1. 程式人生 > >python簡單完成資料清洗

python簡單完成資料清洗

f = open("datasets_origin/foresfires.txt", "r")
nf = open("./datasetss/foresfires.txt", "w+")
for line in f.readlines():
    line = line.split()
    print(line)
    nf.write(line)
nf.close()
f.close()