I have a dataset with a couple million rows. It is in csv format. I wish to import it into Stata. I can do this, but there is a problem - a small percentage (but still many)
I would try the following strategy.
The comma count will be
length(variable) - length(subinstr(variable, ",", "", .))