I have 20 .csv files which are 2001.csv 2002.csv...... 2020.csv, and I intend to import them into Stata. The following is the command:
forvalues i=2001/2020 {
clear
import delimited 'i'.csv
save 'i'.dta,replace
}
But the command window shows that "i" is invalid. I don't know what the problem is, andI need your advice urgently. Thank you!
Related Posts with import multiple .csv into Stata
Removing trailing dashes in the stringHello! I am extracting zip codes from the string variable called adr by using the following command…
Multi level panel data regression comparing alternativesHi everyone, I'm interested in analyzing a state level policy when I have school level data (with s…
Merge a variabel into another datasetHello all, Attached below is a simple example I have made up so I can fully understand this: Lets s…
Generate dummy variables using loopsHi everyone, I am trying to generate a set of dummies for two variables (using the same set of dumm…
How to regress return difference between different periods?Dear stata users, I am now regress anomalies of the long-short strategy during different investor …
Subscribe to:
Post Comments (Atom)
0 Response to import multiple .csv into Stata
Post a Comment