【发布时间】:2018-05-31 03:34:06
【问题描述】:
我正在尝试使用 parser.make2d 函数将我的 html 表转换为可用的数据框,但我无法安装 parser.make2d 的模块。 在我的python 2.7中,找不到“html_table_parser”模块,所以“from html_table_parser import parser_functions as parse”不起作用。
from urllib2 import urlopen
import pandas as pd
from bs4 import BeautifulSoup
import webbrowser
import requests
from html_table_parser import parser_functions as parse
report = requests.get(url_parsing, proxies = proxies)
report2 = BeautifulSoup(report.text,'html.parser')
body=report2.find("body")
table=body.find_all("table")
p = parser.make2d(table[3])
【问题讨论】:
-
你是如何下载库的?使用点子?
-
我目前使用的是pycharm 2017.2
-
之前没用过pycharm,但是这个有用吗? jetbrains.com/help/pycharm/…
-
不,html_table_parser 不在里面,找不到模块
标签: python dataframe beautifulsoup html-parsing