I have a text file which contains a table like below. The part from other text which is not of much interest to me.
TMP [%] [KT] [1/dm] [SF]
1 0.10020 -0.0000 -60.0 0.0000
2 14.12826 0.0000 0.0 0.0000
3 4.00802 -120.3636 -6.0 191.5646
4 4.80962 0.0000 0.0 0.0000
.....
I wanted to extract only this portion of the text and only first 3 columns. I wrote a code something like:
import codecs
f = codecs.open("dmp.txt", "r",'utf-16-le')
fr = f.readlines()
f.close()
for line in fr:
if line.startswith("TMP")...
However, I am not able to figure out how to read this data column- wise and that to first 3 columns only. Any ideas?