Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
vscodesync0815 opened this issue Nov 11, 2019 · 2 comments

Comments

@vscodesync0815
Copy link

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

@ahoquegh
Copy link

Just open the espandas.py file and search/replace df.reindex_axis(.......) with df.reindex(......). You need to replace in two locations. That should make it work

@dashaub
Copy link
Owner

dashaub commented Nov 17, 2020

Fixed in #4

@dashaub dashaub closed this as completed Nov 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants