1 year ago
#389019
Gayatri
Extract fields in python when all we have is their positions and no delimiter
Hi, I have .txt file for public data in this format with no delimiters. All I have is the headers of the fields based on their positions. Example:
1- 2 FIPS State code (00 for US record)
4- 8 District ID
10-81 District Name
I am trying to load data to Tableau but the column values get messed up. Especially, the Name values get split which is okay but they shift right into the 4th column.
Can someone please help me what is the best way to extract these fields in python when all we have is their positions?
python
python-3.x
data-science
data-extraction
0 Answers
Your Answer