Я использую Pandas -профилирование для создания отчета по моим данным. Код выглядит следующим образом:
# importing the library
from pandas_profiling import ProfileReport
# getting a small subset and passing into ProfileReport constructor
sub = general_data.head()
ProfileReport(sub)
Кажется, это выдает совершенно не связанную ошибку о модуле attr. Что у него нет атрибута "s". Я понимаю, что есть два разных модуля attr и attrs, и что последний имеет атрибут s. Это ссылка, которая говорит об этом, AttributeError: модуль 'attr' не имеет атрибута 's'
Большое спасибо за помощь.
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
in
1 from pandas_profiling import ProfileReport
2 sub = general_data.head()
----> 3 ProfileReport(sub)
D:\anaconda\lib\site-packages\pandas_profiling\__init__.py in __init__(self, df, minimal, config_file, **kwargs)
68
69 # Get dataset statistics
---> 70 description_set = describe_df(df)
71
72 # Build report structure
D:\anaconda\lib\site-packages\pandas_profiling\model\describe.py in describe(df)
600 with multiprocessing.pool.ThreadPool(pool_size) as executor:
601 for i, (column, description) in enumerate(
--> 602 executor.imap_unordered(multiprocess_1d, args)
603 ):
604 series_description[column] = description
D:\anaconda\lib\multiprocessing\pool.py in next(self, timeout)
746 if success:
747 return value
--> 748 raise value
749
750 __next__ = next # XXX
D:\anaconda\lib\multiprocessing\pool.py in worker(inqueue, outqueue, initializer, initargs, maxtasks, wrap_exception)
119 job, i, func, args, kwds = task
120 try:
--> 121 result = (True, func(*args, **kwds))
122 except Exception as e:
123 if wrap_exception and func is not _helper_reraises_exception:
D:\anaconda\lib\site-packages\pandas_profiling\model\describe.py in multiprocess_1d(args)
386 """
387 column, series = args
--> 388 return column, describe_1d(series)
389
390
D:\anaconda\lib\site-packages\pandas_profiling\model\describe.py in describe_1d(series)
366 if series_description["type"] in type_to_func:
367 series_description.update(
--> 368 type_to_func[series_description["type"]](series, series_description)
369 )
370 else:
D:\anaconda\lib\site-packages\pandas_profiling\model\describe.py in describe_categorical_1d(series, series_description)
163 stats["min_length"] = series.str.len().min()
164
--> 165 from visions.application.summaries.series.text_summary import text_summary
166
167 stats.update(text_summary(series))
~\AppData\Roaming\Python\Python37\site-packages\visions\__init__.py in
----> 1 from visions import core
2 from visions import utils
3
4 from visions.core.dtypes.boolean import BoolDtype
5 from visions.core.implementations.types import *
~\AppData\Roaming\Python\Python37\site-packages\visions\core\__init__.py in
----> 1 from visions.core import model
2 from visions.core import implementations
3 from visions.core.functional import (
4 type_cast_frame,
5 type_inference_frame,
~\AppData\Roaming\Python\Python37\site-packages\visions\core\model\__init__.py in
----> 1 from visions.core.model.type import VisionsBaseType, TypeRelation
2 from visions.core.model import typeset
3 from visions.core.model.typeset import VisionsTypeset
~\AppData\Roaming\Python\Python37\site-packages\visions\core\model\type.py in
38
39
---> 40 @attr.s(frozen=True)
41 class TypeRelation:
42 """Relationship encoder between implementations of :class:`visions.core.models.VisionsBaseType`
AttributeError: module 'attr' has no attribute 's' here