无法使用Pandas处理HTML

2024-09-26 22:51:46 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在尝试使用pandas获取此页面源的表:

(in): html_source = driver.page_source
df_html = pd.read_html(html_source)

(out): TypeError: ufunc 'add' did not contain a loop with signature matching types dtype('<U51') dtype('<U51') dtype('<U51')

页面本身包含多个关于资产的表和图。html非常大,因此我粘贴了它和我要解析的表的链接:

HTML:https://www.dropbox.com/s/vbbsz30co99uveq/html_comdinheiro.html?dl=0

截图:https://www.dropbox.com/s/sc0vzafau94ymyr/comdinheiro.png?dl=0


Tags: inhttpscomsourcepandashtmlwwwdriver

热门问题