import random
f =open("newCreateData.csv", "w")
f.write("DATE" +"," +"VALUE" +"\n")
for iin range(1948, 2018):# 获取年份
for jin range(1, 12):# 获取月份
if j ==2:
for hin range(1, 28):# 获取日
f.write(str(i) +"-" +str(j) +"-" +str(h) +"," + ("%.1f" % (10 * random.random())) +"\n")
else:
for hin range(1, 31):# 获取日
f.write(str(i) +"-" +str(j) +"-" +str(h) +"," + ("%.1f" %(10 * random.random())) +"\n")
f.close()