数据采集之指数估值五:平均数,中位数和标准差

#平均数,中位数,标准差
zhishu=DataAPI.MktIdxdEvalGet(secID=u””,ticker=u”000001″,beginDate=u”20010101″,endDate=u”20181225″,field=u”ticker,secShortName,tradeDate,PEType,PEValue,PB,ROE”,pandas=”1″)
zhishu=zhishu[zhishu.PEType==1]
zhishu=zhishu.sort_values(by=[‘tradeDate’], ascending=[False])
d={‘APE’:([np.mean(zhishu.PEValue)]),’MPE’:([np.median(zhishu.PEValue)]),’SPE’:([np.std(zhishu.PEValue)]),’APB’:([np.mean(zhishu.PB)]),’MPB’:([np.median(zhishu.PB)]),’SPB’:([np.std(zhishu.PB)])}
jg=pd.DataFrame(d)
jg

APB APE MPB MPE SPB SPE
0 1.973277 14.203824 1.7 13.73 0.641132 4.188565

数据采集自网络

Leave a Reply

邮箱地址不会被公开。 必填项已用*标注