openstack_gender.py 文件源码

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

项目:ceres 作者: dicortazar 项目源码 文件源码
def upload_data(events_df, es_write_index, es_write, uniq_id):
    # Uploading info to the new ES
    test = events_df.to_dict("index")
    docs = []
    for i in test.keys():
        header = {
               "_index": es_write_index,
               "_type": "item",
               "_id": int(uniq_id),
               "_source": test[i]
        }
        docs.append(header)
        uniq_id = uniq_id + 1
    print (len(docs))
    helpers.bulk(es_write, docs)
    items = []

    return uniq_id
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号