我使用以下方法成功安装了 Pandas 分析模块:
pip install pandas-profiling
从命令提示符(以管理员身份) 我尝试以两种方式导入熊猫分析,结果相同:
方法 1) import pandas_profiling
;
方法 2) from pandas_profiling import ProfileReport
两者都导致下面相同的错误代码,最后一行报告: ValueError:int() 的文字无效,基数为 10:'0rc0'
在此特定错误上搜索此站点和其他站点没有发现与导入模块有关的任何内容。不确定这里发生了什么。 Python 版本是 3.7.3。如果您能在我出错的地方得到任何帮助,我将不胜感激。
ValueError Traceback (most recent call last)
<ipython-input-1-e2a33329b6f0> in <module>
----> 1 from pandas_profiling import ProfileReport
d:\python37\lib\site-packages\pandas_profiling\__init__.py in <module>
4 """
5
----> 6 from pandas_profiling.controller import pandas_decorator
7 from pandas_profiling.profile_report import ProfileReport
8 from pandas_profiling.version import __version__
d:\python37\lib\site-packages\pandas_profiling\controller\pandas_decorator.py in <module>
2 from pandas import DataFrame
3
----> 4 from pandas_profiling.profile_report import ProfileReport
5
6
d:\python37\lib\site-packages\pandas_profiling\profile_report.py in <module>
9 import yaml
10 from tqdm.auto import tqdm
---> 11 from visions import VisionsTypeset
12
13 from pandas_profiling.config import Config, Settings
d:\python37\lib\site-packages\visions\__init__.py in <module>
2
3 from visions import types, typesets, utils
----> 4 from visions.backends import *
5 from visions.declarative import create_type
6 from visions.functional import (
d:\python37\lib\site-packages\visions\backends\__init__.py in <module>
7 import pandas as pd
8
----> 9 import visions.backends.pandas
10 from visions.backends.pandas.test_utils import pandas_version
11
d:\python37\lib\site-packages\visions\backends\pandas\__init__.py in <module>
----> 1 import visions.backends.pandas.types
d:\python37\lib\site-packages\visions\backends\pandas\types\__init__.py in <module>
----> 1 import visions.backends.pandas.types.boolean
2 import visions.backends.pandas.types.categorical
3 import visions.backends.pandas.types.complex
4 import visions.backends.pandas.types.count
5 import visions.backends.pandas.types.date
d:\python37\lib\site-packages\visions\backends\pandas\types\boolean.py in <module>
9 series_not_sparse,
10 )
---> 11 from visions.backends.pandas.test_utils import (
12 coercion_map,
13 coercion_map_test,
d:\python37\lib\site-packages\visions\backends\pandas\test_utils.py in <module>
9 from visions.backends.pandas.series_utils import series_handle_nulls
10
---> 11 pandas_version = tuple([int(i) for i in pd.__version__.split(".")])
12 pandas_na_value = pd.NA if hasattr(pd, "NA") else None
13
d:\python37\lib\site-packages\visions\backends\pandas\test_utils.py in <listcomp>(.0)
9 from visions.backends.pandas.series_utils import series_handle_nulls
10
---> 11 pandas_version = tuple([int(i) for i in pd.__version__.split(".")])
12 pandas_na_value = pd.NA if hasattr(pd, "NA") else None
13
ValueError: invalid literal for int() with base 10: '0rc0'
答案 0 :(得分:0)
能否尝试重新安装force pandas,可能pandas_profiling版本和pandas版本有问题。
`<td>${(+value.name.wins)+(+value.name.loss)}</td>`