小编won*_*rit的帖子

PydanticImportError:“BaseSettings”已移至“pydantic-settings”包

我从 kaggle 下载了泰坦尼克号数据集。我正在通过安装 pandas_profiling 来实现 pandas 的分析

我们将不胜感激您的贡献!

import pandas as pd 
df = pd.read_csv('E:/pythonWorkspace/excelFiles/train.csv')
df.head()

from pandas_profiling import ProfileReport
prof = ProfileReport(df) #object created!
prof.to_file(output_file='output.html')
Run Code Online (Sandbox Code Playgroud)

错误 :

PydanticImportError: `BaseSettings` has been moved to the `pydantic-settings` package. See https://docs.pydantic.dev/2.0.2/migration/#basesettings-has-moved-to-pydantic-settings for more details.

For further information visit https://errors.pydantic.dev/2.0.2/u/import-error
Run Code Online (Sandbox Code Playgroud)

python pandas pandas-profiling

6
推荐指数
1
解决办法
9497
查看次数

标签 统计

pandas ×1

pandas-profiling ×1

python ×1