简体   繁体   中英

pandas read_html skipping a table

trying to read all tables from the url: ' https://www.citypopulation.de/php/netherlands-admin.php?adm2id=0363 ' here is my code:

tables = pd.read_html(url)
print(len(tables))

it outputs 7 but the number of tables in the page are 8. in particular I am missing the nationwide table.

can anyone help me with this issue ?

The data you want is in the first table of the document.

If you execute

print(tables[0])

You will be able to see it:

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM