From cb7355acc49c15abea016e6af52c4f498a0a53c7 Mon Sep 17 00:00:00 2001 From: Frank <1018433655@qq.com> Date: Mon, 9 Dec 2019 21:54:19 +0800 Subject: [PATCH] Update es_pandas.py --- es_pandas/es_pandas.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/es_pandas/es_pandas.py b/es_pandas/es_pandas.py index 3892c36..200847c 100644 --- a/es_pandas/es_pandas.py +++ b/es_pandas/es_pandas.py @@ -107,7 +107,7 @@ def to_pandas(self, index, query_rule={'query': {'match_all': {}}}, heads=[], dt for _ in progressbar.progressbar(range(0, count)): mes = next(anl) for head in heads: - df_li[head].append(mes['_source'][head]) + df_li[head].append(mes['_source'][head] if head in mes['_source'] else np.nan) df_li[self.id_col].append(mes['_id']) return pd.DataFrame(df_li).set_index(self.id_col).astype(dtypes)