-
Notifications
You must be signed in to change notification settings - Fork 77
AttributeError: type object 'NDFrame' has no attribute 'groupby' #133
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
Comments
any resolution?I also find this error |
I have the same problem as mentioned above AttributeError: type object 'NDFrame' has no attribute 'groupby'. Anyone facing this and have resolution...I am still trying |
Same here, from the first |
Workaround. I put constraint like this and run with python3.7
|
This could be relevant: PR to remove (redundant?) NDFrameGroupBy. I don't thing the NDFrameGroupBy was intended as a generic interface that covered both the dataframe and series versions... the NDFrame definition does not implement a groupby method (though I weirdly see it being accessed here. Seems like pandas-ml may want to use a different argument to the append decorator here. Based on digging through the style for If that's an easy fix, whipping up a PR shouldn't be too bad. But I'd want to hear what @sinhrks has to say about it... any particular reason not to use the |
4 years later, this issue is still affecting at least some of us. Fresh install of pandas_ml for Python 3.12.4. |
AttributeError: type object 'NDFrame' has no attribute 'groupby'
from pandas_ml import ConfusionMatrix
cm = ConfusionMatrix(actu, pred)
cm.print_stats()
AttributeError Traceback (most recent call last)
in
----> 1 from pandas_ml import confusion_matrix
2
3 cm = ConfusionMatrix(actu, pred)
4 cm.print_stats()
/usr/local/lib/python3.8/site-packages/pandas_ml/init.py in
1 #!/usr/bin/env python
2
----> 3 from pandas_ml.core import ModelFrame, ModelSeries # noqa
4 from pandas_ml.tools import info # noqa
5 from pandas_ml.version import version as version # noqa
/usr/local/lib/python3.8/site-packages/pandas_ml/core/init.py in
1 #!/usr/bin/env python
2
----> 3 from pandas_ml.core.frame import ModelFrame # noqa
4 from pandas_ml.core.series import ModelSeries # noqa
/usr/local/lib/python3.8/site-packages/pandas_ml/core/frame.py in
16 from pandas_ml.core.accessor import _AccessorMethods
17 from pandas_ml.core.generic import ModelPredictor, _shared_docs
---> 18 from pandas_ml.core.series import ModelSeries
19
20
/usr/local/lib/python3.8/site-packages/pandas_ml/core/series.py in
9
10
---> 11 class ModelSeries(ModelTransformer, pd.Series):
12 """
13 Wrapper for
pandas.Series
to supportsklearn.preprocessing
/usr/local/lib/python3.8/site-packages/pandas_ml/core/series.py in ModelSeries()
78 return df
79
---> 80 @appender(pd.core.generic.NDFrame.groupby.doc)
81 def groupby(self, by=None, axis=0, level=None, as_index=True, sort=True,
82 group_keys=True, squeeze=False):
AttributeError: type object 'NDFrame' has no attribute 'groupby'
The text was updated successfully, but these errors were encountered: