Skip to main content

Elastic Search to Pandas Dataframe

Project description


Two simple functions

  • One used to convert an elastic search collection into a dataframe. See the code for the various parameters.
  • One used to convert a dataframe into an elastic search collection


pip install elastic-helper

the pypi page (

Example Elastic To Pandas


  • es -- The elastic connection object
  • index -- The elastic index
  • query -- (optional) The elastic query in lucene format Example: "module: *"
  • start -- (optional) The time range start if any
  • end -- (optional) The time range start if any
  • timestampfield -- (optional) The timestamp field used by the start and stop parameters
  • datecolumns -- (optional) A collection of columns that must be converted to dates
  • scrollsize -- (optional) The size of the scroll to use
  • size -- (optional) The maximum number of records to retrieve
  • _source -- (optional) The fields to retrieve
from elastic_helper import es_helper 

                                ,_source=['read', 'cpu_percent', 'name']

Example Pandas To Elastic

  • Use an _index column in the dataframe to specify the target index
  • Use an _id column in the dataframe to specify the id
from elastic_helper import es_helper 


Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for elastic-helper, version 1.2.3
Filename, size File type Python version Upload date Hashes
Filename, size elastic_helper-1.2.3.tar.gz (5.0 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page