We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
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'.
The text was updated successfully, but these errors were encountered:
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.
pandas
0.19.0
0.20.1
Sorry, something went wrong.
Fix incompatibility with pandas 0.20.1
f935bae
Fixes #5
No branches or pull requests
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'.
The text was updated successfully, but these errors were encountered: