Skip to content

Scraping Sports Data With Beautifulsoup

This is my first-time web scraping with beautiful soup and wanted to do a little project with hockey since I am a huge fan of the sport. I am a little stuck and wondering how to retrieve the header names of the stats for each player. Here is my current code: I am currently getting an error that says “Re…

Python, Error while installing matplotlib

OS: Windows 10 Python ver: 3.9.0 Error code: I tried: didn’t work. and then I tried: didn’t solve the problem. I read on SO that maybe if I open the shell in administrator mode it could solve the problem but it didn’t work too. I saw someone mentioning ez-setup for this error code. I install…

PatsyError when using statsmodels for regression

I’m using ols in statsmodels to run a regression. Once I run the regressions on each row of my dataframe, I want to retrieve the X variables from patsy thats used in those regressions. But, I get an error that I just cant seem to understand. Edit: I am trying to run a regression as presented in the answ…