📜  从 elasticsearch 获取数据到 jupyter - 任何代码示例

📅  最后修改于: 2022-03-11 14:55:58.933000             🧑  作者: Mango

代码示例1
from datetime import datetime
from elasticsearch import Elasticsearch
from pandas import DataFrame, Series
import pandas as pd
import matplotlib.pyplot as plt
es = Elasticsearch(host="192.168.121.252")
res = es.search(index="_all", doc_type='logs', body={"query": {"match_all": {}}}, size=2, fields=('path','@timestamp'))