Oct-27-2017, 05:10 PM
Hi All
I am very new to python .
I am working with a file with no column header. But the task is to give the file column names based on char positions/substring of data.i have gotten so far to get the first column as below . But i do not know how to actually process the file so it will have column names by the end of it. Please help. Thank you!
<<code>>
with open("/raw10.txt","rb") as f:
... for line in f:
... rec_bytes = int(line[:3])
<<code>>
I am very new to python .
I am working with a file with no column header. But the task is to give the file column names based on char positions/substring of data.i have gotten so far to get the first column as below . But i do not know how to actually process the file so it will have column names by the end of it. Please help. Thank you!
<<code>>
with open("/raw10.txt","rb") as f:
... for line in f:
... rec_bytes = int(line[:3])
<<code>>