Suits was the most-watched TV show in 2023, even though the last episode aired in December 2019. For this reason, I thought I’d use it as an example to show how you can use Polars to extract data from web pages without writing convoluted web scraping scripts with Beautiful Soup or Requests.
In the code below I extract data from a Wikipedia page, clean it up, and assign appropriate data types.
It’s no surprise that over 4 million people watched the pilot of Suits when it aired. In my opinion, this pilot is the best of any TV show ever. Is it any wonder that Suits is having a resurgence? I challenge you to find a better pilot.
Polars is taking over pandas as the go-to library for data analysis. Check out my course to learn the fundamentals of Polars.