📜  python 将 html 表格转换为文本 - Html 代码示例

📅  最后修改于: 2022-03-11 14:53:14.488000             🧑  作者: Mango

代码示例1
import pandas as pd
url = r'https://en.wikipedia.org/wiki/List_of_S%26P_500_companies'
tables = pd.read_html(url) # Returns list of all tables on page
sp500_table = tables[0] # Select table of interest