m_load_update_data.py 文件源码

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

项目:Stock 作者: liuguoyaolgy 项目源码 文件源码
def get_stick_hisdata_m(self,begin_date,end_date):

        # cur.execute("select code,outstanding from t_all_stickcode where outstanding <  50000 and (substr(code,1,1)='0' or substr(code,1,1)='6'); ;")
        self.cur.execute("select code,outstanding from t_all_stickcode a where not EXISTS (select * from t_stick_data_d where code = a.code);")
        sqlrs = self.cur.fetchall();
        # self.cur.execute("delete from t_stick_data_m")
        self.sqlconn.commit()
        for code in sqlrs:
            print(code[0] )
            rs = ts.get_k_data(code=code[0],start=begin_date,end=end_date,ktype='M')
            self.db.delete_date('t_stick_data_m',end_date,code[0])
            self.db.insert_data('t_stick_data_m',rs.as_matrix())
            self.sqlconn.commit()
        return
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号