I have a list of strings and am looking for something like the pd.isin function in Python, so I can just compare the boolean on the list in one condition and without loops.
My idea was to store them in a local and then use inlist like this
but this does not work as this post explains
https://www.statalist.org/forums/for...ith-local-list
Any other ideas?
My idea was to store them in a local and then use inlist like this
Code:
sysuse auto.dta local brands `" "AMC Concord" "Buick Regal" "Buick Skylark" "' keep if inlist(make, `brands')
https://www.statalist.org/forums/for...ith-local-list
Any other ideas?
Comment