swar / nba_api

An API Client package to access the APIs for NBA.com
MIT License
2.47k stars 532 forks source link

Does NBA provide shotcharts detail for playoff? #71

Closed whichen closed 5 years ago

whichen commented 5 years ago

I use : stats = shotchartdetail.ShotChartDetail(team_id=1610612745,player_id=201935, game_id_nullable = '0041800221',context_measure_simple = 'FGA') data_sets = stats.data_sets for data_set in data_sets: df = data_set.get_data_frame() print(df) to get playoff data, but get null

Empty DataFrame Columns: [GRID_TYPE, GAME_ID, GAME_EVENT_ID, PLAYER_ID, PLAYER_NAME, TEAM_ID, TEAM_NAME, PERIOD, MINUTES_REMAINING, SECONDS_REMAINING, EVENT_TYPE, ACTION_TYPE, SHOT_TYPE, SHOT_ZONE_BASIC, SHOT_ZONE_AREA, SHOT_ZONE_RANGE, SHOT_DISTANCE, LOC_X, LOC_Y, SHOT_ATTEMPTED_FLAG, SHOT_MADE_FLAG, GAME_DATE, HTM, VTM] Index: []

Does NBA provide shotcharts detail for playoff? if not, how can i get the play off shot chart detail? Could you help?

TK05 commented 5 years ago

Almost there, just missing one parameter for season_type_all_star;

stats = ShotChartDetail(team_id='1610612745', player_id='201935', game_id_nullable= '0041800221', context_measure_simple = 'FGA', season_type_all_star='Playoffs')

whichen commented 5 years ago

Almost there, just missing one parameter for season_type_all_star;

stats = ShotChartDetail(team_id='1610612745', player_id='201935', game_id_nullable= '0041800221', context_measure_simple = 'FGA', season_type_all_star='Playoffs')

Thank you.