From the course: Vibe Coding for Data Analysts

Unlock this course with a free trial

Join today to access over 25,200 courses taught by industry experts.

Reading data from HTML tables

Reading data from HTML tables

- Sometimes the vibes online hit just right. Things are easy when data sits nicely on your computer, but what if you've got data that you'd like to load from a webpage? Scraping data with tools like "Beautiful Soup" or "Playwright" can be challenging for vibe coding, but reading an HTML table is a great match for it. Let's take a quick look at this table and see what we might have to do. This appears to be a standard HTML table without too much complication, so we should be able to use pandas to read it in. The only thing that we might need to get a little creative with is giving Copilot the link location. Grab your microphone and get that table into our environment. We'll start by copying and pasting the link into our script. Use the object called "link" to read in the HTML table. That looks great. And like it's suggesting, we will have to use the first table to get the one that we want. Now that it's in, we need to pull out the first table. Extract the first table from the list. And…

Contents