我正在对我的数字数据进行探索性数据分析,我尝试运行 pandas 分析,但在生成报告结构时出现错误。
import pandas as pd
from pandas_profiling import ProfileReport
df = pd.read_csv('mydatadata.csv')
print(df)
profile = ProfileReport(df)
profile.to_file(output_file="mydata.html")
错误日志如下所示
总结数据集:99%|████████████████████████████████████████████ ███████████████████████████▌| 1144/1150 [46:07<24:03, 240.60s/it, 计算 cramers 相关性]C:\Users\USER\AppData\Local\Programs\Python\Python39\lib\site-packages\pandas_profiling\model\correlations. py:101: UserWarning: 尝试计算 cramers 相关性,但失败了。要隐藏此警告,请禁用计算(使用
df.profile_report(correlations={"cramers": {"calculate": False}})
如果这对您的用例有问题,请将其报告为问题: https ://github.com/pandas-profiling/pandas-profiling/issues (包括错误消息:'没有数据;observed
大小为 0.') warnings.warn( 总结数据集:100%|██████████████████████████████████ █████████████████████████████████████████████████▋| 1145/1150 [46:19<17:32, 210.49s/it, Get scatter matrix] 分配位图失败