AttributeError: type object 'NDFrame' has no attribute 'groupby'
See original GitHub issueAttributeError: 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) <ipython-input-41-821e4723af64> in <module> ----> 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 <module> 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 <module> 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 <module> 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 <module>
9
10
—> 11 class ModelSeries(ModelTransformer, pd.Series):
12 “”"
13 Wrapper for pandas.Series
to support sklearn.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’
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:5
Top GitHub Comments
Workaround. I put constraint like this and run with python3.7
Same here, from the first
import pandas_ml as pdml
in a fresh pipenv with only pandas and pandas-ml