Closed sayakghorai34 closed 1 month ago
Hi @sayakghorai34 ,
thank you for your bug report. Nevertheless you are using pandas-profiling
which was deprecated and support removed in 2022.
I suggest that you use a rather more updated version from pypi by using:
pip install ydata-profiling
I'll be closing this issue as this is related to the usage of older versions of the package.
Current Behaviour
{ "name": "PydanticImportError", "message": "
BaseSettings
has been moved to thepydantic-settings
package. See https://docs.pydantic.dev/2.9/migration/#basesettings-has-moved-to-pydantic-settings for more details.For further information visit https://errors.pydantic.dev/2.9/u/import-error", "stack": "--------------------------------------------------------------------------- PydanticImportError Traceback (most recent call last) Cell In[26], line 3 1 from pydantic_settings import BaseSettings ----> 3 from pandas_profiling import ProfileReport 4 import pandas as pd
File ~/Downloads/CSI/.venv/lib/python3.11/site-packages/pandas_profiling/init.py:6 1 \"\"\"Main module of pandas-profiling. 2 3 .. include:: ../../README.md 4 \"\"\" ----> 6 from pandas_profiling.controller import pandas_decorator 7 from pandas_profiling.profile_report import ProfileReport 8 from pandas_profiling.version import version
File ~/Downloads/CSI/.venv/lib/python3.11/site-packages/pandas_profiling/controller/pandas_decorator.py:4 1 \"\"\"This file add the decorator on the DataFrame object.\"\"\" 2 from pandas import DataFrame ----> 4 from pandas_profiling.profile_report import ProfileReport 7 def profile_report(df: DataFrame, **kwargs) -> ProfileReport: 8 \"\"\"Profile a DataFrame. 9 10 Args: (...) 15 A ProfileReport of the DataFrame. 16 \"\"\"
File ~/Downloads/CSI/.venv/lib/python3.11/site-packages/pandas_profiling/profile_report.py:13 10 from tqdm.auto import tqdm 11 from visions import VisionsTypeset ---> 13 from pandas_profiling.config import Config, Settings 14 from pandas_profiling.expectations_report import ExpectationsReport 15 from pandas_profiling.model.alerts import AlertType
File ~/Downloads/CSI/.venv/lib/python3.11/site-packages/pandas_profiling/config.py:5 2 from enum import Enum 3 from typing import Any, Dict, List, Optional ----> 5 from pydantic import BaseModel, BaseSettings, Field 8 def _merge_dictionaries(dict1: dict, dict2: dict) -> dict: 9 \"\"\" 10 Recursive merge dictionaries. 11 (...) 14 :return: Merged dictionary 15 \"\"\"
File ~/Downloads/CSI/.venv/lib/python3.11/site-packages/pydantic/init.py:402, in getattr(attr_name) 400 dynamic_attr = _dynamic_imports.get(attr_name) 401 if dynamic_attr is None: --> 402 return _getattr_migration(attr_name) 404 package, module_name = dynamic_attr 406 if module_name == 'module':
File ~/Downloads/CSI/.venv/lib/python3.11/site-packages/pydantic/_migration.py:296, in getattr_migration..wrapper(name)
294 return import_string(REDIRECT_TO_V1[import_path])
295 if import_path == 'pydantic:BaseSettings':
--> 296 raise PydanticImportError(
297 '
BaseSettings
has been moved to thepydantic-settings
package. ' 298 f'See https://docs.pydantic.dev/{version_short()}/migration/#basesettings-has-moved-to-pydantic-settings ' 299 'for more details.' 300 ) 301 if import_path in REMOVED_IN_V2: 302 raise PydanticImportError(f'{import_path}
has been removed in V2.')PydanticImportError:
BaseSettings
has been moved to thepydantic-settings
package. See https://docs.pydantic.dev/2.9/migration/#basesettings-has-moved-to-pydantic-settings for more details.For further information visit https://errors.pydantic.dev/2.9/u/import-error" }
Expected Behaviour
getting PydanticImportError
Data Description
no such dataset. just installed pandas-profiling using pip and
from pandas_profiling import ProfileReport
line gives errorCode that reproduces the bug
pandas-profiling version
v3.2.0
Dependencies
OS
macOS 14.6.1
Checklist