擅长:python、mysql、java
<p>我认为您使用了像beautifuldsoup这样的html解析器,这是正确的做法。read_html()读取的是html表而不是html页。</p>
<p>你会想做这样的事。。。</p>
<pre><code>from bs4 import BeautifulSoup
import pandas as pd
table = BeautifulSoup(open('C:/age0.html','r').read()).find('table')
df = pd.read_html(table) #I think it accepts BeatifulSoup object
#otherwise try str(table) as input
</code></pre>