类为rowheader
或data
的所有内容都是使用read_html
导入到pandas中的,但是{
所以从本质上说,我得到的是所有数据,但不是列标签,这些标签告诉我数据实际上是什么。在
我该怎么解决呢?在
<html xmlns:x="urn:schemas-microsoft-com:office:excel">
<head>
<meta name="Generator" content="SAS Software Version 9.3, see www.sas.com">
<meta http-equiv="Content-type" content="charset=windows-1252">
</head>
<body>
<table class="table">
<colgroup>
<col>
<col>
<col>
<col>
</colgroup>
<colgroup>
<col>
<col>
</colgroup>
<thead>
<tr>
<td class="header" rowspan="2" colspan="4" scope="colgroup"> </td>
<td class="header" colspan="2" scope="colgroup">SubDistrict</td>
</tr>
<tr>
<td class="header" scope="col">Title1
<br>
<br>
</td>
<td class="header" scope="col">Title2
<br>
<br>
</td>
</tr>
</thead>
<tbody>
<tr>
<td class="rowheader" rowspan="12" scope="rowgroup">M1</td>
<td class="rowheader" scope="row">1.1</td>
<td class="rowheader" scope="row">var1</td>
<td class="rowheader" scope="row">TOTAL</td>
<td class="data">7</td>
<td class="data">7</td>
</tr>
<tr>
etc...
目前没有回答
相关问题 更多 >
编程相关推荐