我是python新手,我无法用pandas读取python中的HTML文档,我遇到了一些异常,这段代码是在python空闲状态下运行的,以便于在堆栈溢出时发布。你知道吗
Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 22:22:05) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license()" for more information.
>>> import pandas as pd
>>> pd.__version__
'0.24.2'
>>> d = pd.read_html('pandasbootcamp.herokuapp.com/')
Traceback (most recent call last):
File "<pyshell#2>", line 1, in <module>
d = pd.read_html('pandasbootcamp.herokuapp.com/')
File "C:\Program Files\Python37\lib\site-packages\pandas\io\html.py", line 1094, in read_html
displayed_only=displayed_only)
File "C:\Program Files\Python37\lib\site-packages\pandas\io\html.py", line 894, in _parse
parser = _parser_dispatch(flav)
File "C:\Program Files\Python37\lib\site-packages\pandas\io\html.py", line 840, in _parser_dispatch
raise ImportError("html5lib not found, please install it")
ImportError: html5lib not found, please install it
>>>
你得跑了
或者用任何你喜欢的包管理器安装html5lib
相关问题 更多 >
编程相关推荐