1. 首页
  2. 数据库
  3. 其它
  4. Python读取数据集并消除数据中的空行方法

Python读取数据集并消除数据中的空行方法

上传者: 2020-12-30 19:40:07上传 PDF文件 39.84KB 热度 24次
如下所示: # -*- coding: utf-8 -*- # @ author hulei 2016-5-3 from numpy import * import operator from os import listdir import sys reload(sys) sys.setdefaultencoding('utf8') # x,y=getDataSet_dz('iris.data.txt',4) def getDataSet(filename,numberOfFeature): #将数据集读入内存 fr = open(filename) numberOfLines =
下载地址
用户评论