Read, write and update large scale pandas DataFrame with ElasticSearch
Project description
es_pandas
Read, write and update large scale pandas DataFrame with ElasticSearch.
Requirements
This package should work on both python3(>=3.4). ElasticSearch should be version 6.x or 7.x(>=6.8).
Usage
import pandas as pd
import numpy as np
from es_pandas import to_pandas, to_es
# Information of es cluseter
es_host = 'localhost:9200'
index = 'demo'
# Example data frame
df = pd.DataFrame({'Alpha': [chr(i) for i in range(97, 128)],
'Num': [x for x in range(31)],
'Date': pd.date_range(start='2019/01/01', end='2019/01/31')})
# Example of write data to es, auto create and put template to es if template does not exits
to_es(df, es_host, index)
# Example of read data from es
df = to_pandas(es_host, index)
print(df.head())
License
(c) 2019 Frank
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
es_pandas-0.0.1.tar.gz
(3.2 kB
view hashes)
Built Distribution
Close
Hashes for es_pandas-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 277444a69d943ceaa18b363877b1be38eb91d0c9453bf1bf02554f4830c720c9 |
|
MD5 | 879b55d3f4084cff5e3024f35bd4ef4a |
|
BLAKE2b-256 | acb767b02810a543fc53be0df15fd4001843843cb168116c23928fdbe6cc4ecc |