赞
踩
初始示范表如下:
1.1 CSV文件转化为数组
import numpy as np
mydata = np.loadtxt(open("example.csv","rb"),delimiter=",",skiprows=0)
转换结果:
1.2 数组转化为CSV文件
import numpy as np
mydata=[[1,2,3],[4,5,6],[7,8,9]]
np.savetxt('new.csv', mydata, delimiter = ',')
未完待续……
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。