Dear Stata users:
I hope you are all doing well.
I receive the following error when trying to run the following code:
-> error message: file D:\overview\Missouri.csv not found
-> code:
.
clear*
forvalues i = 1(1)150 { // Adjust the range as needed
// Import CSV file based on the current value of `i`
import delimited "D:\overview\Missouri\`i'.csv", stringcols(23)
// Save as Stata file with adjusted filename
save "D:\overview\Missouri\`i'a.dta", replace
}
Could you please highlight what is wrong about the code since the file location is correct? Thanks in advance!
I hope you are all doing well.
I receive the following error when trying to run the following code:
-> error message: file D:\overview\Missouri.csv not found
-> code:
.
clear*
forvalues i = 1(1)150 { // Adjust the range as needed
// Import CSV file based on the current value of `i`
import delimited "D:\overview\Missouri\`i'.csv", stringcols(23)
// Save as Stata file with adjusted filename
save "D:\overview\Missouri\`i'a.dta", replace
}
Could you please highlight what is wrong about the code since the file location is correct? Thanks in advance!
Comment