SecondDraw.py 文件源码

python
阅读 35 收藏 0 点赞 0 评论 0

项目:sogaQuant 作者: idoplay 项目源码 文件源码
def run(self):
        sql_data = "select * FROM s_stock_runtime WHERE dateline =20160607 and s_code='sh600774' "
        tmpdf = pandas.read_sql(sql_data, self.mysql.db)
        pandas.set_option('display.width', 400)
        res = {}
        for i in range(len(tmpdf)):
            item = tmpdf.iloc[i]
            #inf = ''
            if item.s_code not in res.keys():
                res[item.s_code] = {'B': 0, 'S': 0}

            if item.B_1_volume > 100000:
                res[item.s_code]['B'] += 1
            if item.B_2_volume > 100000:
                res[item.s_code]['B'] += 1
            if item.B_3_volume > 100000:
                res[item.s_code]['B'] += 1
            if item.B_4_volume > 100000:
                res[item.s_code]['B'] += 1
            if item.B_5_volume > 100000:
                res[item.s_code]['B'] += 1

            if item.S_1_volume > 100000:

                res[item.s_code]['S'] += 1
            if item.S_2_volume > 100000:
                #print item
                res[item.s_code]['S'] += 1
            if item.S_3_volume > 100000:
                res[item.s_code]['S'] += 1
            if item.S_4_volume > 100000:
                res[item.s_code]['S'] += 1
            if item.S_5_volume > 100000:
                res[item.s_code]['S'] += 1

        print res
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号