【问题标题】:Pandas Profiling, profile_report method errorPandas Profiling,profile_report 方法错误
【发布时间】:2022-07-19 21:58:19
【问题描述】:

我用 pip 为 jupyter notebook 安装了pandas-profiling(不使用 conda!),一切正常,直到我安装了plotly

现在,当我尝试使用 df.profile_report() 方法时,我收到以下错误:

DispatchError: Function

请指教,

【问题讨论】:

    标签: python-3.x pandas plotly pandas-profiling


    【解决方案1】:

    这里出现同样的错误。

    这是我为解决这个问题所做的:

    卸载所有以下依赖项,然后使用这些特定版本重新安装它们:

    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/66563463/how-to-treat-attribute-dtype-of-numpy-generic-objects-error

    为我工作,希望对你有帮助!

    【讨论】:

      猜你喜欢
      • 2019-12-03
      • 2022-10-05
      • 2020-09-21
      • 2020-10-12
      • 1970-01-01
      • 2015-03-13
      • 1970-01-01
      • 2019-11-06
      • 1970-01-01
      相关资源
      最近更新 更多