Python,将html表转换为数据框架
我试图使用parser.make2d函数将html表转换为可用的数据帧,但我无法安装parser.make2d模块。 在我的Python2.7中,它找不到“html\u table\u parser”模块,因此“from html\u table\u parser import parser\u functions as parse”不起作用Python,将html表转换为数据框架,python,dataframe,beautifulsoup,html-parsing,Python,Dataframe,Beautifulsoup,Html Parsing,我试图使用parser.make2d函数将html表转换为可用的数据帧,但我无法安装parser.make2d模块。 在我的Python2.7中,它找不到“html\u table\u parser”模块,因此“from html\u table\u parser import parser\u functions as parse”不起作用 from urllib2 import urlopen import pandas as pd from bs4 import BeautifulSoup
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])
似乎没有安装html_table_解析器模块 你试过跑步吗
python -m pip install html_table_parser
在命令行上?您是如何下载库的?使用pip?我目前正在使用pycharm 2017.2以前没有使用过pycharm,但这会有帮助吗?不,html_表_解析器不在那里,找不到模块