vishaalagartha / basketball_reference_scraper

A python module for scraping static and dynamic content from Basketball Reference.
MIT License
254 stars 91 forks source link

get_schedule() returns a ValueError: Length mismatch #81

Open gabeschoenbach opened 2 years ago

gabeschoenbach commented 2 years ago

Running

schedule = get_schedule(season, playoffs=True)

Gives a ValueError: Length mismatch: Expected axis has 6 elements, new values have 5 elements due to the following line in seasons.py (line 28):

df.columns = ['DATE', 'VISITOR', 'VISITOR_PTS', 'HOME', 'HOME_PTS']

It looks like the dataframe now includes an "ARENA" column, so the corrected line should be

df.columns = ['DATE', 'VISITOR', 'VISITOR_PTS', 'HOME', 'HOME_PTS', `ARENA`]

EDIT: I posted a PR to address this here.