【发布时间】:2015-04-13 14:40:10
【问题描述】:
所以我有一个数据文件,我必须从中提取特定数据。使用;
x=15 #need a way for code to assess how many lines to skip from given data
maxcol=2000 #need a way to find final row in data
data=numpy.genfromtxt('data.dat.csv',skip_header=x,delimiter=',')
column_one=data[0;max,0]
column_two=data[0:max,1]
这为我提供了一个特定情况的数组,其中所需数据上方有 (x=)15 行元数据,并且数据行数为 (maxcol=)2000。我该如何更改代码以满足 x 和 maxcol 的任何值?
【问题讨论】: