我试图从elastic search获得超过10000条观测数据,并将其放入熊猫数据中框架:-在
es_index = "logstash-2018.08.26"
documento = "your_doc_type"
body = {"from": 0, "size": 100,
"query": {
"constant_score" : {
"filter" : {
"bool" : {
"must" : [{
"range": {"@timestamp" : {
"gte": "2018-08-26T14:00:08.000Z",
"lte": "2018-08-26T16:00:00.000Z"
}}
}],
"filter": [
{"term" :{"type" :"vx_apache_json"}},
{"term" :{"api" :"viv_signin.php"}},
{"term" :{"domain":"fnwp"}}
]
}}}}}
res = helpers.scan(
client = es,
scroll = '2s',
query = body,
index = es_index)
当我试图得到资源的价值时
^{pr2}$当我使用下面的代码。。在
for i in res:
print(i)
我正在获取以下格式的数据
我可以给你一个更好的办法。。我猜你想弄到一万多张唱片。。试试下面的方法,你也会得到数百万张唱片:——
首次安装
1.)定义客户
^{pr2}$2.)
search = Search(using=client)
3.)检查点击总数
4.)
s = Search(using=client)
5)写下你的疑问
6.)使用扫描将数据转储到数据帧中…扫描会将所有数据转储到数据帧中,即使数据以十亿计,因此请小心。在
7.)看看你的数据框,然后微笑:)
将所有数据存储在一个变量中,然后使用pd数据帧(你的变量)。在
相关问题 更多 >
编程相关推荐