I have a csv file with two identical columns:
X,X
0,0
1,1
2,2
I would like to import this into Stata 13, but it does not like importing the second X (since the names are the same):
. import delimited "filename.csv"
X already defined
Error creating variables
r(109);
Is there a simple way to force the import?
I do not want to specify the rows to import. The actual dataset has 100+ variables, and the duplicated variables are distributed throughout.
Similarly, I do not want to manually rename the variables.
I am fine if Stata wants to either drop or rename the second X.
As background, this csv file is being generated by some sloppy SQL code. The duplicated variables are precisely the variables I use for the joins. I could clean up the SQL code or pre-clean (with e.g. Python), but I would ideally like to have Stata force the import.