【问题标题】:keyword rotation is not recognized (Pandas Profiling)无法识别关键字轮换(Pandas Profiling)
【发布时间】:2019-12-24 09:56:58
【问题描述】:

我正在尝试使用 pandas_profiling 包进行数据分析。对于基本用法,我已遵循此文档

https://github.com/pandas-profiling/pandas-profiling

并从中使用以下代码

import numpy as np
import pandas as pd
import pandas_profiling

df = pd.DataFrame(
np.random.rand(100, 5),
columns=['a', 'b', 'c', 'd', 'e']
)

df.profile_report(style={'full_width':True})

但在 Anaconda 中运行此代码时,我收到以下错误

ValueError:无法识别关键字轮换;有效的关键字是 ['size', 'width', 'color', 'tickdir', 'pad', 'labelsize', 'labelcolor', 'zorder', 'gridOn', 'tick1On', 'tick2On', 'label1On ', 'label2On', 'length', 'direction', 'left', 'bottom', 'right', 'top', 'labelleft', 'labelbottom', 'labelright', 'labeltop']

【问题讨论】:

  • 你发布的代码在 Jupyter Notebook 中对我来说很好
  • 你能告诉我为什么会出现这个错误,因为我已经安装了所有的库
  • 请发布pd.show_versions()的输出
  • @UsmanRafiq '3.1.0'
  • @anky_91 在我升级我的包后它对我有用,谢谢

标签: python pandas pandas-profiling


【解决方案1】:

供将来参考:更新您的 pandas 和 matplotlib 包。高于 2.4.0 的 pandas-profiling 版本会自动更新这些包。

【讨论】:

    猜你喜欢
    • 2020-10-09
    • 2018-03-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-04-21
    • 1970-01-01
    • 1970-01-01
    • 2017-04-06
    相关资源
    最近更新 更多