https://jerrynest.io/python-pandas-get-data/

import pandas as pd
url = 'http://www.stockq.org/market/asia.php'
pd.read_html(url)[4]

import pandas as pd
url = 'http://www.stockq.org/market/asia.php'
table = pd.read_html(url)[4]
table = table.drop(table.columns[[0,1,2,3,4]],axis=0)
table = table.drop(table.columns[9:296],axis=1)
table

創作者介紹
創作者 Caution Han的部落格 的頭像
Caution Han

Caution Han的部落格

Caution Han 發表在 痞客邦 留言(0) 人氣( 130 )