common.py 文件源码

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

项目:stock 作者: pythonstock 项目源码 文件源码
def get_hist_data_cache(code, date_start, date_end):
    cache_file = bash_stock_tmp + "%s^%s.gzip.pickle" % (date_end, code)
    # ?????????????????????
    if os.path.isfile(cache_file):
        print("######### read from cache #########", cache_file)
        return pd.read_pickle(cache_file, compression="gzip")
    else:
        stock = ts.get_hist_data(code, start=date_start, end=date_end)
        stock = stock.sort_index(0)  # ???????????
        stock.to_pickle(cache_file, compression="gzip")
        return stock
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号