看板 [ Python ]
討論串[問題] pandas爬蟲問題
共 3 篇文章
首頁
上一頁
1
下一頁
尾頁

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者Czero (悠閒)時間7年前 (2017/02/26 22:59), 編輯資訊
0
0
0
內容預覽:
我設計了一個簡單的範例網頁要來練習pandas爬網頁中的table,. html:. <body>. <table border="1" align="center" style="width:774px;">. <thead>. <tr>. <td>ID</td>. <td>NAME</td>.
(還有294個字)

推噓2(2推 0噓 0→)留言2則,0人參與, 最新作者ntumath (math mad)時間7年前 (2017/02/28 17:29), 7年前編輯資訊
0
0
0
內容預覽:
這個問題應該牽涉到你的html的寫法. 在thead中. <tr>. <td>ID</td>. <td>NAME</td>. </tr>. 我猜測你想要把ID和NAME當每行的Index,不然你不會特別寫在thead裡. 但是我去看pandas.read_html的source中的parse_raw
(還有197個字)

推噓4(4推 0噓 3→)留言7則,0人參與, 最新作者wii8898333時間5年前 (2018/08/02 03:48), 5年前編輯資訊
0
1
0
內容預覽:
df = pd.read_html('****'). a =pd.Dateframe(df[2]) #(要第二張表格,年月日資料). b=pd.Dateframe(df[3]) #(第三張表格,資料內容). 請問要將a設定為b的columns要怎麼用呢?. 自己用. b =df[3],columns
(還有198個字)
首頁
上一頁
1
下一頁
尾頁