Skip to content

Commit

Permalink
Update es_pandas.py
Browse files Browse the repository at this point in the history
  • Loading branch information
fuyb1992 committed Dec 9, 2019
1 parent 1be9a47 commit cb7355a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion es_pandas/es_pandas.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit cb7355a

Please sign in to comment.