nba_api icon indicating copy to clipboard operation
nba_api copied to clipboard

Rookies have not been added to players

Open peterwilliams-hca opened this issue 4 years ago • 2 comments

It appears that the rookie class is missing from players.get_active_players() and players.get_players().

peterwilliams-hca avatar Feb 16 '21 13:02 peterwilliams-hca

I tried the code on #195 and I still don't get how we can get the rookie players id so we can get their stats. Having the example number after commonplayerinfo, which I had to replace with CommonAllPlayers to get it to run, causes an error. I got the data table when I had no number in the ( ), but don't know what to do after that to get the rookie players id and then stats. Please help.

SpeeJ2 avatar Feb 25 '21 23:02 SpeeJ2

@SpeeJ2 - Thank you for the feedback. It would appear that you are looking for something like "EXPERIENCE" indicating how many years they have been in the league. I've not checked to see if that is in the data we use to populate this table. I'll remove the PR from this and mark this as an enhancement.

rsforbes avatar Mar 05 '21 12:03 rsforbes

@SpeeJ2 - Old issue. I came across this while reviewing issues for the upcoming release. The endpoint you are likely looking for is PlayerIndex. That endpoint returns the following data:

'PlayerIndex': ["PERSON_ID", "PLAYER_LAST_NAME", "PLAYER_FIRST_NAME", "PLAYER_SLUG", "TEAM_ID", "TEAM_SLUG", "IS_DEFUNCT", "TEAM_CITY", "TEAM_NAME", "TEAM_ABBREVIATION", "JERSEY_NUMBER", "POSITION", "HEIGHT", "WEIGHT", "COLLEGE", "COUNTRY", "DRAFT_YEAR", "DRAFT_ROUND", "DRAFT_NUMBER", "ROSTER_STATUS", "PTS", "REB", "AST", "STATS_TIMEFRAME", "FROM_YEAR", "TO_YEAR"]

rsforbes avatar Oct 05 '23 01:10 rsforbes