#python2可以用file替代open with open("test.csv","wt",newline='')ascsvfile: writer=csv.writer(csvfile) #写入多行用writerows writer.writerows([["index","a_name","b_name"],[0,1,3],[1,2,3],[2,3,4]]) 这样就不会有空行了。 第二种方法: 先写入csv文件,然后读出去掉空行,再写入 ...
Read/write python numpy array NPY/NPZ files. Contribute to cdcseacave/TinyNPY development by creating an account on GitHub.