全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
4536 11
2011-09-10
各位大侠们,在wind下载的 股票代码中含有 SZ,比如000001.SZ,在stata中如何去掉后面的.SZ。着急中。。。
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2011-9-10 19:08:34
谁能 回答一下啊,正在 使用中。。。
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2011-9-10 19:10:21
求楼主。。。
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2011-9-10 19:10:39
最方便的是在excel中先将SZ去掉。
如使用 left(B1,6),assuming the first cell is B1

然后复制或导入到STATA中。
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2011-9-10 19:22:45
abel0429 发表于 2011-9-10 19:10
最方便的是在excel中先将SZ去掉。
如使用 left(B1,6),assuming the first cell is B1
我现在就是采用的这种方法。应该还有更好的方法吧?。。谢谢你啊
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2011-9-10 19:48:40
查函数 function



    substr(s,n1,n2)
       Domain s:     strings
       Domain n1:    integers 1 to 244 and -1 to -244
       Domain n2:    integers 1 to 244 and -1 to -244
       Range:        strings
       Description:  returns the substring of s, starting at column n1, for a length of n2. If n1 < 0, n1 is
                         interpreted as distance from the end of the string; if n2 = . (missing), the remaining
                         portion of the string is returned.

                         substr("abcdef",2,3) = "bcd"
                         substr("abcdef",-3,2) = "de"
                         substr("abcdef",2,.) = "bcdef"
                         substr("abcdef",-3,.) = "def"
                         substr("abcdef",2,0) = ""
                         substr("abcdef",15,2) = ""
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

点击查看更多内容…
相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群