I am trying to import a text file that seems to lack a consistent delimiter. It is about different financial transactions and their time of arrival and processing. The format (see shortened and anonymized sample below) seems to be tab-delimited, but the letters and numbers are actually separated by (multiple) spaces. Moreover, there is a lot of "noise" in the file that I am not interested in. My idea to prepare a dataset ready for a proper analysis was initially to import all the information in one column (as one single variable) and then manually split the column into variables and observations. Here, each new observation is marked by its reference ("REFERENZ-NUMMER"), and the other variables of interest are each preceded by "ERFASSUNG/BEARBEITUNG". Then I am facing the challenge of disentangling the observations/variables from one column.
I now wonder what would be the optimal approach to clean this messy text file. Is there a smarter approach than to use
Code:
import delimited "filename", delimiter("", collapse)
I've also tried to prepare the file in excel, unfortunately, without any improvements. Any comments/guidance is appreciated!
Regards,
Julian
0 Response to Import text files: Delimiter and Transformation Issues
Post a Comment