GithubHelp home page GithubHelp logo

dashaub / espandas Goto Github PK

View Code? Open in Web Editor NEW
25.0 6.0 12.0 54 KB

Reading and writing pandas DataFrames in Elasticsearch

License: GNU General Public License v3.0

Python 96.49% Shell 3.51%
elasticsearch pandas data-frame python

espandas's People

Contributors

dashaub avatar muriloandre2000 avatar spacewaterbear avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

espandas's Issues

Pandas deprecated functions should be reviewed

Greetings, I was testing your software. Congratulations it looks very functional, However there are problems with the most recent versions of pandas since reindex_axis is no longer avaible in pandas 1.1.3 I will try to make a correction if I get sometime. In the mean time I report this bug and people that may use this code should consider runing a specific version of pandas.

Incompatible with pandas > 0.21.0: AttributeError: 'DataFrame' object has no attribute 'reindex_axis'

Using a pandas 0.25.3 dataframe the following error occurs:

File "/home/x/anaconda3/envs/x/lib/python3.7/site-packages/espandas/espandas.py", line 82, in es_write
df = df.reindex_axis(sorted(df.columns), axis=1)
File "/home/x/anaconda3/envs/x/lib/python3.7/site-packages/pandas/core/generic.py", line 5179, in getattr
return object.getattribute(self, name)
AttributeError: 'DataFrame' object has no attribute 'reindex_axis'

Deprecated since version 0.21.0: Use reindex instead.

see:
https://pandas.pydata.org/pandas-docs/version/0.24/reference/api/pandas.DataFrame.reindex_axis.html

Numeric fields load as str

Hello,
I have an issue when I tried to visualize my data into kibana after upload it in ElasticSearch through this package. My numeric fields are converted in str because of line 83 espandas.py file.
I have implemented a quick solution : delete this line and replace na by a string : 'Unknown'
I am working on a better solution : create a mapping and pass it as arg when index is created.

What do you think of these solutions? Are you interested by my contribution to your project?

Kevin

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.