We’ll download data tables from a web page directly with pandas. There is no need to send a request or use an API
Case Study
Use Wikipedia to download a table showing the list of the largest banks in the world by market capitalization
Save in df
View top 10
Scrape Table
import pandas as pd# data is at URL ='https://en.wikipedia.org/wiki/List_of_largest_banks'# read tables on that page using pandas read_html()tables = pd.read_html(URL)# Extract the first tabledf = tables[0]df.head(10)