...

/

Web Scraping Exercise: Reading the Data

Web Scraping Exercise: Reading the Data

Perform web scraping to extract specific bank ranking tables from a Wikipedia page, parse the HTML response using BeautifulSoup, and store the extracted data in pandas DataFrames.

We'll cover the following...

Time to practice and experiment with web scraping. In this exercise, you’ll extract data from a Wikipedia page about the world’s largest banks.

The web page contains two tables ranking the largest banks in the world. The first table ranks banks by total assets.

Wikipedia page: List of largest banks—By total assets
Wikipedia page: List of largest banks—By total assets

The second table ranks countries by the number of banks per country.

Wikipedia page: List of largest banks—Banks by country or territory
Wikipedia page: List of largest banks—Banks by country or territory

Your task is to scrape the two tables, store them in a pandas DataFrame, and export them as a CSV file for ...