logo
Loading...

關於pandas_profiling使用 - Cupoy

Question:請問老師安裝pandas_profiling後無法使用的原因?import num...

關於pandas_profiling使用

2020/07/31 03:28 PM
機器學習新手論壇
Kevin
觀看數:0
回答數:2
收藏數:1

Question:請問老師安裝pandas_profiling後無法使用的原因?

import numpy as np

import pandas as pd

from pandas_profiling import ProfileReport


df2 = pd.DataFrame(

    np.random.rand(100, 5),

    columns=["a", "b", "c", "d", "e"])

df2

profile = ProfileReport(df2, title="Pandas Profiling Report")


FileNotFoundError                         Traceback (most recent call last)
~\Anaconda3\lib\site-packages\matplotlib\style\core.py in use(style)
   120             try:
--> 121                 rc = rc_params_from_file(style, use_default_template=False)
   122                 _apply_style(rc)

~\Anaconda3\lib\site-packages\matplotlib\__init__.py in rc_params_from_file(fname, fail_on_error, use_default_template)
   866     """
--> 867     config_from_file = _rc_params_in_file(fname, fail_on_error=fail_on_error)
   868

~\Anaconda3\lib\site-packages\matplotlib\__init__.py in _rc_params_in_file(fname, transform, fail_on_error)
   795     rc_temp = {}
--> 796     with _open_file_or_url(fname) as fd:
   797         try:

~\Anaconda3\lib\contextlib.py in __enter__(self)
   111         try:
--> 112             return next(self.gen)
   113         except StopIteration:

~\Anaconda3\lib\site-packages\matplotlib\__init__.py in _open_file_or_url(fname)
   773             encoding = "utf-8"
--> 774         with open(fname, encoding=encoding) as f:
   775             yield f

FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\QQ\\Anaconda3\\lib\\site-packages\\pandas_profiling\\pandas_profiling.mplstyle'

The above exception was the direct cause of the following exception:

OSError                                   Traceback (most recent call last)
<ipython-input-38-4356038cdce2> in <module>
----> 1 profile = ProfileReport(df2, title="Pandas Profiling Report")

~\Anaconda3\lib\site-packages\pandas_profiling\__init__.py in __init__(self, df, **kwargs)

~\Anaconda3\lib\site-packages\pandas_profiling\describe.py in describe(df, bins, check_correlation, correlation_threshold, correlation_overrides, check_recoded, pool_size, **kwargs)

~\Anaconda3\lib\site-packages\matplotlib\style\core.py in use(style)
   125                     "{!r} not found in the style library and input is not a "
   126                     "valid URL or path; see `style.available` for list of "
--> 127                     "available styles".format(style)) from err
   128
   129

OSError: 'C:\\Users\\QQ\\Anaconda3\\lib\\site-packages\\pandas_profiling\\pandas_profiling.mplstyle' not found in the style library and input is not a valid URL or path; see `style.available` for list of available styles