我在pandas-profiling上安装了用于jupyter笔记本的pip (不使用conda!),一切正常,直到我安装了plotly。
现在,当我尝试使用df.profile_report()方法时,会得到以下错误:
"/Users/myuser/myvenv/lib/python3.9/site-packages/pandas_profiling/model/pandas/missing_pandas.py",DispatchError:函数<代码对象pandas_missing_bar,位于0x12c62e500,文件pandas_missing_bar行18>
请告诉我,
发布于 2022-07-19 13:58:19
这里也有同样的错误。
这就是我为解决这个问题所做的:
卸载所有以下依赖项,然后使用以下特定版本重新安装它们:
pandas-profiling==2.7.1
Jinja2==3.0.3
itsdangerous==2.0.1
Flask==1.1.1参考资料:https://github.com/pallets/flask/issues/4494
这样做之后,您可能会在尝试生成ProfileReport时得到此错误。
TypeError: Cannot interpret '<attribute 'dtype' of 'numpy.generic' objects>' as a data type您还可以通过安装这个特定版本的numpy来解决这个问题:
pip install numpy==1.16.5 --force-reinstall为我工作,希望它能帮到你!
https://stackoverflow.com/questions/71558286
复制相似问题