Extracting Game of Thrones data from Wikipedia

I'm learning different methods to import data from the web in my Web and Cloud Computing class. This week, I learnt web scrapping with BeautifulSoup, a python package for extracting data out of HTML and XML files.
In this post, I show how I collected Game of Thrones data from this Wikipedia page that lists all Game of Thrones episodes by season. More specifically, I scrapped and summarized in a pandas dataframe, all episodes' titles, links, seasons, number of U.S. viewers, and running time .

Code

Output

Below is a snippet of the final output. It has 67 rows in total.

Cool ! right ? Looking forward to learning Application Programming Interface (API) next week.

Written on March 23, 2019