File "/usr/local/lib/python3.7/site-packages/pandas_ml/core/accessor.py", line 81, in _update_method_mapper
for key, class_dict in compat.iteritems(cls._method_mapper):
AttributeError: module 'pandas.compat' has no attribute 'iteritems'
I have the same error too with python3.7. I solved it with changing iteritems()
to items()
.
There are two lines on accessor.py under @classmethod, change them into:
for key, class_dict in cls._method_mapper.items():
'
'
'
class_dict = {k: getattr(cls, m) for k, m in class_dict.items()}
For my version,
I have also encounter another import error ImportError: cannot import name 'range' from 'pandas.compat'
in File "/usr/local/lib/python3.7/site-packages/pandas_ml/confusion_matrix/stats.py"
. just delete from pandas.compat import range
would do.
Reference:
https://github.com/pandas-dev/pandas/commit/e26e2dfe6e93922830fb5fb7868b87238b85911a#diff-21f71fbdb0d3dfa55dc948e2ddcddc92