Skip to content
Snippets Groups Projects
Commit e3210db5 authored by Christoph.Knote's avatar Christoph.Knote
Browse files

sdf

parent 86bf1b18
No related branches found
No related tags found
No related merge requests found
......@@ -174,6 +174,26 @@ def read(ict_file):
return(out)
def read_first_and_last(ict_file):
out = read_header(ict_file)
f = open( ict_file, 'r' )
nul = [f.readline() for i in xrange(out['nheader'])]
def nan_miss_float(raw, vmiss):
return [ float(x.replace(vmiss[i], 'NaN')) for i, x in enumerate(raw) ]
out['data'] = [ nan_miss_float(f.readline().split(','), out['vmiss']) ]
for line in f:
pass
last = line
out['data'] += [ nan_miss_float(last.split(','), out['vmiss']) ]
f.close()
return(out)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment