I cannot understand how to work with the following files:
- a .sas file containing the location -column- and length of each variable (I have 500+); and
- a text file containing values of these variables (I have more than 120k observations).
I already posted a question about this and seems that the only way to merge variables' names and values is to do it manually. The problem is that I've been trying to figure this out for days now and often made mistakes.
Does anyone have an idea of how to solve this problem and automize importation with python pandas?
The .sas file (as opened in WPS workbench) appears as follow:
DATA YOUR_DATA;
INFILE 'C:\Users\...\file.txt';
***Column VarName Varlength VarLabel***
@18 PROFAM 6. /* progressivo famiglia univoco a livello indagine */
@24 PROIND 2. /* progressivo individuo nell'ambito della famiglia */
@29 NCOMP 2. /* n° dei componenti la famiglia attuale
Where Column VarName Varlength VarLabel are not in the real code and have been added here to explain the code.