首页 > 解决方案 > 无法识别关键字轮换(Pandas Profiling)

问题描述

我正在尝试使用 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']

标签: pythonpandaspandas-profiling

解决方案


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


推荐阅读