Skip to content

Query on existing field and value fails with AttributeError: 'numpy.bool_' object has no attribute 'empty' #146

@michaelhyatt

Description

@michaelhyatt

Trying to query for an existing value in "winlogbeat-*", getting AttributeError

/usr/local/lib/python3.6/dist-packages/eland/query.py in exists(self, field, must)
     39         """
     40         if must:
---> 41             if self._query.empty():
     42                 self._query = NotNull(field)
     43             else:

AttributeError: 'numpy.bool_' object has no attribute 'empty'

Code:

import eland as ed
import numpy as np
import pandas as pd

from elasticsearch import Elasticsearch

es = Elasticsearch(cloud_id="XYZ", http_auth=('user', 'pwd'))
ed_df = ed.DataFrame(client=es, index_pattern="winlogbeat-*", columns=["@timestamp", "event.code", "user.name"])
ed_df.query('"user.name" == "ADMIN"')

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions