You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to use both Scoreboard and ScoreBoardV2 endpoints, but i did not succeed in make them work.
The error I'm encountering is list index out of range.
My code run with a lot of endpoints, so i really don't understand why these are not working at all.
Please can you help?
Code
from nba_api.stats.endpoints import ScoreboardV2
import pandas as pd
def fetch_nba_schedule(date='2023-10-25'):
# Call the ScoreboardV2 endpoint
scoreboard = ScoreboardV2(
league_id='00', # '00' for NBA
game_date=date
)
# Get data frames
data_frames = scoreboard.get_data_frames()
return data_frames
NBA API Version
1.5.0
Issue
I tried to use both Scoreboard and ScoreBoardV2 endpoints, but i did not succeed in make them work.
The error I'm encountering is list index out of range.
My code run with a lot of endpoints, so i really don't understand why these are not working at all.
Please can you help?
Code
from nba_api.stats.endpoints import ScoreboardV2
import pandas as pd
def fetch_nba_schedule(date='2023-10-25'):
# Call the ScoreboardV2 endpoint
scoreboard = ScoreboardV2(
league_id='00', # '00' for NBA
game_date=date
)
data_frames = fetch_nba_schedule(date='2023-10-25')
The text was updated successfully, but these errors were encountered: