O'Reilly logo

Practical Business Intelligence by Ahmed Sherif

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required