I was hoping some one could help me out, I need to search a column in .csv and.las files, return the maximum and the corresponding value in another row.
Thank you
matto.g1456 0 Newbie Poster
Recommended Answers
Jump to Postbetter to replace then line 5 with
md, inc =line.rsplit(" ",1)
To only separate the wanted last number from the end.
Then you can do for datalines:
md='sdfa asdfas fwer\t2334.34234\t\t342.453\t\t34234.3242\t\t42472.234543' sep='\t\t' if sep in md: firstcol, _, rest = md.partition(sep) _, firstcol = …
Jump to PostJust as console proof:
outp = open('outp.txt', 'w') for eachline in open('inp.txt'): if eachline[0].isdigit(): outp.write(' '.join(eachline.split()[:2])+'\n') outp.close() print open('outp.txt').read() newlist = [(float(a),float(b)) for a,b in [line.split() for line in open('outp.txt') ]] print newlist # print the result to a message box tempresStr1 = "# The maximum inclination …
All 7 Replies
Beat_Slayer 17 Posting Pro in Training
matto.g1456 0 Newbie Poster
matto.g1456 0 Newbie Poster
matto.g1456 0 Newbie Poster
TrustyTony 888 ex-Moderator Team Colleague Featured Poster
matto.g1456 0 Newbie Poster
TrustyTony 888 ex-Moderator Team Colleague Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.