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

module 'pandas' has no attribute 'indexes' #5

Closed
eotp opened this issue Jun 3, 2017 · 1 comment
Closed

module 'pandas' has no attribute 'indexes' #5

eotp opened this issue Jun 3, 2017 · 1 comment

Comments

@eotp
Copy link

eotp commented Jun 3, 2017

Hi I run into problems when I follow the example notebook .

The section on Grouped weighted calculations fails

calc.mean(grp_marriage_sex, "income").round().astype(int)


AttributeError Traceback (most recent call last)
in ()
----> 1 calc.mean(grp_marriage_sex, "income").round().astype(int)

P:\Anaconda3\envs\charite\lib\site-packages\weightedcalcs\core.py in func_wrapper(self, thing, *args, **kwargs)
20 agg = thing.apply(lambda x: func(self, x, *args, **kwargs))
21 is_series = isinstance(agg, pd.core.series.Series)
---> 22 has_multiindex = isinstance(agg.index, pd.indexes.multi.MultiIndex)
23 if is_series and has_multiindex:
24 return agg.unstack()

AttributeError: module 'pandas' has no attribute 'indexes

I am using pandas '0.20.1' and weightedcalcs '0.1.1'.

@jsvine
Copy link
Owner

jsvine commented Jun 5, 2017

Thanks for flagging, @eotp! Looks like this error is being caused by something introduced to pandas between 0.19.0 and 0.20.1. I'll look into it.

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

2 participants