[問題] input輸入問題,已解決
如題,我想在原input輸入股票名稱然後希望pandas幫我去爬蟲網頁
import pandas as pd
stock_name =input('請輸入股名:')
df = pd.read_html('http;//******.com.tw) #年報2015-2017年
其中****(能夠隨input輸入而更改),******部分我希望能是input輸入的東西,
但是礙於pd.read_html('')內必須是字串方式呈現。
想了幾天都沒想出要怎麼解決?
請教版友
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 114.39.217.77
※ 文章網址: https://www.ptt.cc/bbs/Python/M.1534335882.A.748.html
→
08/15 20:29,
7年前
, 1F
08/15 20:29, 1F
推
08/15 23:23,
7年前
, 2F
08/15 23:23, 2F
推
08/15 23:39,
7年前
, 3F
08/15 23:39, 3F
→
08/16 00:32,
7年前
, 4F
08/16 00:32, 4F
→
08/16 12:51,
7年前
, 5F
08/16 12:51, 5F
※ 編輯: wii8898333 (39.9.227.162), 08/17/2018 04:13:46
→
08/17 08:29,
7年前
, 6F
08/17 08:29, 6F
→
08/17 08:30,
7年前
, 7F
08/17 08:30, 7F
→
08/17 08:31,
7年前
, 8F
08/17 08:31, 8F
→
08/17 14:41,
7年前
, 9F
08/17 14:41, 9F
→
08/17 19:54,
7年前
, 10F
08/17 19:54, 10F
→
08/17 19:54,
7年前
, 11F
08/17 19:54, 11F
→
08/17 19:55,
7年前
, 12F
08/17 19:55, 12F
→
08/18 02:59,
7年前
, 13F
08/18 02:59, 13F
→
08/18 02:59,
7年前
, 14F
08/18 02:59, 14F
Python 近期熱門文章
PTT數位生活區 即時熱門文章