Web scraping with Python

Let's start a new Python notebook by going to File and selecting New Jupyter Notebook. We can assign it the following name: PercentBikeRiders by Country. We will scrape a table from the following Wikipedia website: https://github.com/asherif844/PracticalBusinessIntelligence/wiki/AdventureWorks---Detail-by-CountryCode.

This table lists country codes with the percentage of bicycle riders, as seen in the following screenshot:

Web scraping with Python

In our new notebook, our first lines of code will import all of the required modules that we just finished installing, as seen in the following script:

#import packages into the project from bs4 import ...

Get Practical Business Intelligence now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.