将YDATA_PROFILIN导入到数据链驱动器

问题描述 投票:0回答:1
ydata_profiling

。这是我的代码:

%pip install ydata-profiling

from ydata_profiling import ProfileReport
eRror:

Unexpected exception formatting exception. Falling back to standard exception
Traceback (most recent call last):
  File "/databricks/python/lib/python3.10/site-packages/IPython/core/interactiveshell.py", line 3508, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "/root/.ipykernel/4981/command-1591-1042983042", line 7, in <module>
    from ydata_profiling import ProfileReport
  File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-0155e154-17ee-4694-8c2c-e1f8de5f9e80/lib/python3.10/site-packages/ydata_profiling/__init__.py", line 7, in <module>
    from ydata_profiling.compare_reports import compare
  File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-0155e154-17ee-4694-8c2c-e1f8de5f9e80/lib/python3.10/site-packages/ydata_profiling/compare_reports.py", line 8, in <module>
    from ydata_profiling.profile_report import ProfileReport
  File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-0155e154-17ee-4694-8c2c-e1f8de5f9e80/lib/python3.10/site-packages/ydata_profiling/profile_report.py", line 23, in <module>
    from ydata_profiling.model.describe import describe as describe_df
  File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-0155e154-17ee-4694-8c2c-e1f8de5f9e80/lib/python3.10/site-packages/ydata_profiling/model/describe.py", line 19, in <module>
    from ydata_profiling.model.sample import get_custom_sample, get_sample
  File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-0155e154-17ee-4694-8c2c-e1f8de5f9e80/lib/python3.10/site-packages/ydata_profiling/model/sample.py", line 4, in <module>
    from pydantic.main import BaseModel
  File "pydantic/main.py", line 29, in init pydantic.main
  File "pydantic/class_validators.py", line 8, in init pydantic.class_validators
ImportError: cannot import name ConfigError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/databricks/python/lib/python3.10/site-packages/IPython/core/interactiveshell.py", line 2105, in showtraceback
    stb = self.InteractiveTB.structured_traceback(
  File "/databricks/python_shell/dbruntime/ipykernel_patches/ultratb_patch.py", line 36, in patched_structured_traceback
    return orig_structured_traceback(self_, *args, **kwargs)
  File "/databricks/python/lib/python3.10/site-packages/IPython/core/ultratb.py", line 1428, in structured_traceback
    return FormattedTB.structured_traceback(
  File "/databricks/python/lib/python3.10/site-packages/IPython/core/ultratb.py", line 1319, in structured_traceback
    return VerboseTB.structured_traceback(
  File "/databricks/python/lib/python3.10/site-packages/IPython/core/ultratb.py", line 1172, in structured_traceback
    formatted_exception = self.format_exception_as_a_whole(etype, evalue, etb, number_of_lines_of_context,
  File "/databricks/python/lib/python3.10/site-packages/IPython/core/ultratb.py", line 1087, in format_exception_as_a_whole
    frames.append(self.format_record(record))
  File "/databricks/python/lib/python3.10/site-packages/IPython/core/ultratb.py", line 969, in format_record
    frame_info.lines, Colors, self.has_colors, lvals
  File "/databricks/python/lib/python3.10/site-packages/IPython/core/ultratb.py", line 792, in lines
    return self._sd.lines
  File "/databricks/python/lib/python3.10/site-packages/stack_data/utils.py", line 145, in cached_property_wrapper
    value = obj.__dict__[self.func.__name__] = self.func(obj)
  File "/databricks/python/lib/python3.10/site-packages/stack_data/core.py", line 698, in lines
   pieces = self.included_pieces
  File "/databricks/python/lib/python3.10/site-packages/stack_data/utils.py", line 145, in cached_property_wrapper
    value = obj.__dict__[self.func.__name__] = self.func(obj)
  File "/databricks/python/lib/python3.10/site-packages/stack_data/core.py", line 649, in included_pieces
    pos = scope_pieces.index(self.executing_piece)
  File "/databricks/python/lib/python3.10/site-packages/stack_data/utils.py", line 145, in cached_property_wrapper
    value = obj.__dict__[self.func.__name__] = self.func(obj)
  File "/databricks/python/lib/python3.10/site-packages/stack_data/core.py", line 628, in executing_piece
    return only(
  File "/databricks/python/lib/python3.10/site-packages/executing/executing.py", line 164, in only
    raise NotOneValueFound('Expected one value, found 0')
executing.executing.NotOneValueFound: Expected one value, found 0
ImportError: cannot import name ConfigError
to [databricks page]的链接(

Https://www.databricks.com/blog/2023/04/04/03/pandas-profling-now-supports-apache-parks-park.html

.html
.
    

使用重新启动内核后工作

dbutils.library.restartPython()
python databricks data-quality
1个回答
0
投票

最新问题
© www.soinside.com 2019 - 2025. All rights reserved.