一、CSV文件读写
1、读取
1.1基于python csv库
#3.读取csv至字典x,y
import csv
# 读取csv至字典
csvFile = open(r'G:\训练小样本.csv',...(r’G:\0pythonstudy\chengxu\test.csv’,‘w’),就会出现多出一空行。...二、Excel文件处理
1、读取
方法一:
使用Python的 xlrd包。...[5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0]
----
方法二:
或者,可以把Excel文件转换成csv格式文件,直接修改后缀名,好像会出错,还是建议另存为修改成...csv模块;
python_xlrd对Excel处理;
python : 将txt文件中的数据读为numpy数组或列表;
pandas read_csv API官网;