MENU

Fun & Interesting

Web Scraping Football Matches From The EPL With Python [part 1 of 2]

Dataquest 119,234 3 years ago
Video Not Working? Fix It Now

In this video, we'll learn how to scrape football match data from the English Premier League. We'll download all of the matches for several seasons using Python and the requests library. We'll then parse and clean the data using BeautifulSoup and pandas. By the end, we'll have a single pandas DataFrame with all of the EPL matches for multiple seasons. In the next part of this series, we'll use the data we scraped to predict which side will win each match. You can find the code we write here - https://github.com/dataquestio/project-walkthroughs/tree/master/football_matches . Chapters 00:00 Introduction 01:21 Scraping our first page with requests 05:07 Parsing html links with BeautifulSoup 10:40 Extract match stats using pandas and requests 14:21 Get match shooting stats with requests and pandas 18:09 Cleaning and merging scraped data with pandas 22:07 Scraping data for multiple season and teams with a loop 35:42 Final match results DataFrame and next steps --------------------------------- Join 1M+ Dataquest learners today! Master data skills and change your life. Sign up for free: https://bit.ly/3O8MDef

Comment