Alright, so let’s talk about my “total pars at masters 2023” thing. It’s not as fancy as it sounds, promise!

Basically, I was messing around with parsing data, specifically from some old Masters Tournament results I found online. I wanted to see if I could automatically extract the scores for each player. Sounds simple, right? Well…
First off, I grabbed the data. It was in a janky HTML format. Think tables inside tables, all sorts of weird spacing. Not ideal.
Then came the fun part: cleaning. I used Python with Beautiful Soup to parse the HTML. I basically had to walk through the HTML structure, find the relevant table cells, and extract the text. It was a mess of `find_all()` and `get_text()` calls. Seriously, I spent hours just trying to get the right data out without all the garbage.
Next, I structured the data. Once I had the raw scores, I needed to organize them. I wanted a nice list of dictionaries, with each dictionary representing a player and their scores for each round. I did some list comprehensions and dictionary creation. It was a bit hairy, but I got there.
After that, I calculated the “total pars”. This was the easy part, once I had the clean, structured data. I looped through each player’s scores and added them up. Nothing fancy, just plain addition.

Finally, I dumped the results into a CSV file. I used the `csv` module in Python. I opened the file in write mode, wrote the header row (player name, total pars), and then wrote each player’s data. Boom, done!
It wasn’t a perfect system. There were still some manual tweaks I had to make, especially to deal with weird player names or missing scores. But overall, it was a cool little project. I learned a lot about web scraping, data cleaning, and basic Python programming.
Here’s a quick rundown of what I used:
- Python (duh)
- Beautiful Soup (for parsing HTML)
- `csv` module (for writing to CSV)
Honestly, the biggest challenge was just dealing with the messy HTML. If the data had been in a cleaner format (like JSON or CSV to begin with), it would have been a breeze. But hey, that’s how it goes sometimes!
Anyway, that’s the story of my “total pars at masters 2023” adventure. Not exactly groundbreaking, but it was a fun learning experience. Maybe I’ll try something more complicated next time!
