当前位置: 首页> 财经> 产业 > 兰州企业网站_永康网站优化公司_最新军事消息_广州seo招聘网

兰州企业网站_永康网站优化公司_最新军事消息_广州seo招聘网

时间:2025/7/15 8:23:53来源:https://blog.csdn.net/chenwiehuang/article/details/142531654 浏览次数:0次
兰州企业网站_永康网站优化公司_最新军事消息_广州seo招聘网

在最初的数据探查的时候,可以通过pandas的函数,以及matplotlib做图像绘图,这个工作比较重复和低效,所以pandas针对常用的数据列统计和展示,做了EDA工具profiling,可以自动帮助数据分析。

问题1:在python 3.10.11环境下,安装pip install pandas-profiling,运行出现错误

pydantic.errors.PydanticImportError: `BaseSettings` has been moved to the `pydantic-settings` package.

因为profiling版本更新问题,暂时没有去解决。

问题2:升级profiling版本,名称从pandas-profiling变换为ydata_profiling,运行出错

AttributeError: module 'numba' has no attribute 'generated_jit'

判定,仍然是版本冲突。解决方案:

pip uninstall numba

pip install numba

安装出现错误:

 requires joblib<1.4,>=1.2.0, but you have joblib 1.4.2 which is incompatible.
sktime 0.26.0 requires scikit-learn<1.5.0,>=0.24, but you have scikit-learn 1.5.2 which is incompatible.

解决方案:卸载掉scikit-learn,joblib等,然后执行安装

pip install ydata-profiling

会自动安装需要的scikit-learn依赖,最后运行得到HTML文件。

 

 profiling的使用

import pandas as pd
from ydata_profiling import ProfileReportdf = pd.read_csv('dataset/listings-2.csv')
original_report = ProfileReport(df, title='Original Data')
original_report.to_file("original_report.html")

根据显示,对数据处理后可以做对比查看

transformed_report = ProfileReport(df_transformed, title="Transformed Data")
comparison_report = original_report.compare(transformed_report)
comparison_report.to_file("original_vs_transformed.html")

关键字:兰州企业网站_永康网站优化公司_最新军事消息_广州seo招聘网

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

责任编辑: