python stata 交互

python
from sfi import Data
from sfi import Datetime
from sfi import Frame
from sfi import Macro
from sfi import ValueLabel
cca="北京"
ac=cca.split(' ')
for ii in ac:
    Macro.setLocal('x',ii)
end
disp "`x'"

python:
from sfi import Scalar
from sfi import Data
from sfi import Macro
aa=Scalar.getString("r(k_drop)")
aa=Macro.getValue(`zong')
print(str(aa))
end

 

posted @ 2023-04-24 12:34  myrj  阅读(16)  评论(0编辑  收藏  举报