Skip to content

Python program for fetching data from an Elasticsearch index and storing it in a Pandas dataframe.

Notifications You must be signed in to change notification settings

Cirice/Es2Pandas

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Elastic_to_Pandas

A Python class for reading content of an ES index into a Pandas DataFrame

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

For running the code you need an up-and-running Elasticsearch index along with a Python interpreter installed on your OS. To install the requirements please use the requirements.txt, On Debian/Ubuntu you could run the following in terminal in order to installed the dependencies:

sudo pip3 install -U -r requirements.txt # change pip3 to pip for Python2 installation

API and use-cases

Use class ElasticCom and search_and_export_to_df method in the following example:

from elastic_to_pandas import ElasticCom

if __name__ == "__main__":

  data = ElasticCom(index='index-name', host="localhost",
	port=9200, username="elastic",
	password="changeme",
	authentication=True,
	doc_type='doc', size=10, from_=0)
	.search_and_export_to_df()

For more info use help(ElasticCom)

Versioning

We use SemVer for versioning. For the versions available, see the CHANGELOG.md.

About

Python program for fetching data from an Elasticsearch index and storing it in a Pandas dataframe.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages