Open jdcarbon opened 3 years ago
I had the same issue with playergamelogs.PlayerGameLogs. For both the date_from_nullable
and date_to_nullable
parameters, you need to pass dates as strings in this format: mm/dd/yyyy
. Here's some code that I used that was working for me:
from nba_api.stats.endpoints import playergamelogs
playergamelogs.PlayerGameLogs(
season_nullable = '2020-21',
date_from_nullable = "03/28/2021",
date_to_nullable = "03/28/2021"
).player_game_logs.get_data_frame()
I'm trying a similar task but when I use league_id_nullable="00" it is still including ALL leagues as opposed to just NBA. Any clue what the problem is here?
This is the request being used, where td is today's date.
lgf.LeagueGameFinder(
league_id_nullable = '00',
date_from_nullable='08/01/2020',
date_to_nullable=td,
season_type_nullable = 'Regular Season'
).get_data_frames()[0]
I managed to do this by going directly to the scoreboardv3
endpoint directly.
https://stats.nba.com/stats/scoreboardv3?GameDate={date}&LeagueID=00
Is it possible to get all the games played on a specific date? I tried the following code but have not been able to get it to work.
I get the following error (which I assume means that the response is empty):