Eland error after upgrading Elastic

After upgrading ElasticSearch from version 8.3.1 to 8.3.2 none of my Eland/Pandas code seems to work anymore. The thing that seems to cause the error is converting the Eland object to Pandas using .to_pandas()

import eland as ed
from elasticsearch import Elasticsearch

if __name__ == '__main__':

  username = "..."
  password = "..."

  es = Elasticsearch(hosts='http://{}:{}@localhost:9200'.format(username, password), request_timeout=30)
  df = ed.DataFrame(es_client=es, es_index_pattern='example_index').to_pandas()

I am receiving the following error message:

/Users/michael/Documents/Elastic-Code/.venv/lib/python3.9/site-packages/eland/query_compiler.py:283: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead.  To get a de-fragmented frame, use `newframe = frame.copy()`
  df[missing] = pd.Series(dtype=pd_dtype)

Any form of help would be highly appreciated.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.