【问题标题】:Unable to read the html file using Pandas无法使用 Pandas 读取 html 文件
【发布时间】:2018-01-25 08:12:26
【问题描述】:

我无法使用 pandas 读取 HTML 文件。以下是错误截图:

【问题讨论】:

  • html5lib 版本是什么?
  • html5lib 版本是'0.999999999'
  • 升级你的pandas然后再试一次
  • 升级了 pandas,但仍然收到同样的错误
  • 无法在 python3 中使用以下版本重现此问题,pandas '0.20.3'bs4 '4.6.0'html5lib '0.999999999'。它会为我加载。

标签: python pandas data-visualization


【解决方案1】:

请参考stackoverflow中讨论的相同html解析问题的链接: html5lib: TypeError: __init__() got an unexpected keyword argument 'encoding'

你必须通过 pip 安装

html5lib=="0.9999999"

这里的问题仍然存在于 html5lib 解析树,因此您必须单独安装 html5lib,因为我们无法升级 Pandas 库中的特定模块。

【讨论】:

    猜你喜欢
    • 2019-03-18
    • 2023-02-10
    • 2018-02-03
    • 1970-01-01
    • 2014-09-23
    • 1970-01-01
    • 2021-11-30
    • 2016-02-11
    相关资源
    最近更新 更多