Bom dia,
df_html = pd.read_html('https://unafiscosaude.org.br/site/tabelas-de-precos-dos-planos-ativos-para-comercializacao/') df_html[0]
Ao executar o código acima para tentar importar os dados diretamente do site aparece o seguinte erro:
ImportError Traceback (most recent call last) Cell In[36], line 1 ----> 1 df_html = pd.read_html('https://unafiscosaude.org.br/site/tabelas-de-precos-dos-planos-ativos-para-comercializacao/') 2 df_html[0]
File ~\anaconda3\Lib\site-packages\pandas\io\html.py:1212, in read_html(io, match, flavor, header, index_col, skiprows, attrs, parse_dates, thousands, encoding, decimal, converters, na_values, keep_default_na, displayed_only, extract_links, dtype_backend) 1208 check_dtype_backend(dtype_backend) 1210 io = stringify_path(io) -> 1212 return _parse( 1213 flavor=flavor, 1214 io=io, 1215 match=match, 1216 header=header, 1217 index_col=index_col, 1218 skiprows=skiprows, 1219 parse_dates=parse_dates, 1220 thousands=thousands, 1221 attrs=attrs, 1222 encoding=encoding, 1223 decimal=decimal, 1224 converters=converters, 1225 na_values=na_values, 1226 keep_default_na=keep_default_na, 1227 displayed_only=displayed_only, 1228 extract_links=extract_links, 1229 dtype_backend=dtype_backend, 1230 )
File ~\anaconda3\Lib\site-packages\pandas\io\html.py:977, in _parse(flavor, io, match, attrs, encoding, displayed_only, extract_links, **kwargs) 975 retained = None 976 for flav in flavor: --> 977 parser = _parser_dispatch(flav) 978 p = parser(io, compiled_match, attrs, encoding, displayed_only, extract_links) 980 try:
File ~\anaconda3\Lib\site-packages\pandas\io\html.py:926, in _parser_dispatch(flavor) 924 if flavor in ("bs4", "html5lib"): 925 if not _HAS_HTML5LIB: --> 926 raise ImportError("html5lib not found, please install it") 927 if not _HAS_BS4: 928 raise ImportError("BeautifulSoup4 (bs4) not found, please install it")
ImportError: html5lib not found, please install it