All Projects → dashaub → espandas

dashaub / espandas

Licence: GPL-3.0 license
Reading and writing pandas DataFrames in Elasticsearch

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to espandas

Styleframe
A library that wraps pandas and openpyxl and allows easy styling of dataframes in excel
Stars: ✭ 252 (+950%)
Mutual labels:  data-frame, pandas
framequery
SQL on dataframes - pandas and dask
Stars: ✭ 63 (+162.5%)
Mutual labels:  data-frame, pandas
Gdeltpyr
Python based framework to retreive Global Database of Events, Language, and Tone (GDELT) version 1.0 and version 2.0 data.
Stars: ✭ 124 (+416.67%)
Mutual labels:  data-frame, pandas
Spark Excel
A Spark plugin for reading Excel files via Apache POI
Stars: ✭ 216 (+800%)
Mutual labels:  data-frame
daany
Daany - .NET DAta ANalYtics .NET library with the implementation of DataFrame, Time series decompositions and Linear Algebra routines BLASS and LAPACK.
Stars: ✭ 49 (+104.17%)
Mutual labels:  data-frame
fer
Facial Expression Recognition
Stars: ✭ 32 (+33.33%)
Mutual labels:  pandas
dstoolbox
Tools that make working with scikit-learn and pandas easier.
Stars: ✭ 43 (+79.17%)
Mutual labels:  pandas
Apache Spark Node
Node.js bindings for Apache Spark DataFrame APIs
Stars: ✭ 136 (+466.67%)
Mutual labels:  data-frame
python-eodhistoricaldata
Download data from EOD historical data https://eodhistoricaldata.com/ using Python, Requests and Pandas.
Stars: ✭ 67 (+179.17%)
Mutual labels:  pandas
Chatistics
A WhatsApp Chat analyzer and statistics.
Stars: ✭ 32 (+33.33%)
Mutual labels:  pandas
django-model-values
Taking the O out of ORM.
Stars: ✭ 57 (+137.5%)
Mutual labels:  pandas
anesthetic
Nested Sampling post-processing and plotting
Stars: ✭ 34 (+41.67%)
Mutual labels:  pandas
read-protobuf
Small library to read serialized protobuf(s) directly into Pandas Dataframe
Stars: ✭ 28 (+16.67%)
Mutual labels:  pandas
skutil
NOTE: skutil is now deprecated. See its sister project: https://github.com/tgsmith61591/skoot. Original description: A set of scikit-learn and h2o extension classes (as well as caret classes for python). See more here: https://tgsmith61591.github.io/skutil
Stars: ✭ 29 (+20.83%)
Mutual labels:  pandas
Tablesaw
Java dataframe and visualization library
Stars: ✭ 2,785 (+11504.17%)
Mutual labels:  data-frame
es pandas
Read, write and update large scale pandas DataFrame with Elasticsearch
Stars: ✭ 34 (+41.67%)
Mutual labels:  pandas
Algorithmic-Trading
Algorithmic trading using machine learning.
Stars: ✭ 102 (+325%)
Mutual labels:  pandas
bow
Go data analysis / manipulation library built on top of Apache Arrow
Stars: ✭ 20 (-16.67%)
Mutual labels:  data-frame
movingpandas-examples
Example notebooks illustrating MovingPandas use cases
Stars: ✭ 116 (+383.33%)
Mutual labels:  pandas
kobe-every-shot-ever
A Los Angeles Times analysis of Every shot in Kobe Bryant's NBA career
Stars: ✭ 66 (+175%)
Mutual labels:  pandas

espandas

PyPI version Build Status Coverage Status

Reading and writing pandas DataFrames in ElasticSearch

Requirements.

This package should work on both python 2(>=2.7) and 3(>=3.4) but has primarily been tested on python 2.7. ElasticSearch is of course required and should be version 2.x.

Installation

The package is hosted on PyPi and can be installed with pip:

pip install espandas

Alternatively, the development version from Github can be installed:

pip install git+git://github.com/dashaub/espandas.git

Tests

Unit tests can be run with pytest or nosetests. Code coverage can be established with pytest-cov from PyPi:

py.test --cov=espandas

Usage

This example assumes ElasticSearch is running on localhost on the standard port. If different connection infromation needs to be specified, it can be passed to the Espandas() constructor as keyward arguments. The DataFrame to insert must have a column that will be used for the unique identifier _id in ElasticSearch: the default value is uid_name = 'indexId'.

import pandas as pd
import numpy as np
from espandas import Espandas

# Example data frame
df = (100 * pd.DataFrame(np.round(np.random.rand(100, 5), 2))).astype(int)
df.columns = ['A', 'B', 'C', 'D', 'E']
df['indexId'] = (df.index + 100).astype(str)

# Create a client and write the DataFrame. If necessary, connection
# information to the ES cluster can be passed in the espandas constructor
# as keyword arguments.
INDEX = 'foo_index'
TYPE = 'bar_type'
esp = Espandas()
esp.es_write(df, INDEX, TYPE)


# Query for the first ten rows and see that they match the original
k = df.indexId[0:10]
res = esp.es_read(k, INDEX, TYPE)
res == df.iloc[0:10].astype('str')

License

(c) 2017 David Shaub

This package is free software released under the GPL-3 license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].