spilchen / yahoo_fantasy_api

python bindings for the Yahoo! Fantasy API (https://yahoo-fantasy-api.readthedocs.io/)
MIT License
87 stars 33 forks source link

Retrieve FGA, FGM and FTA, FTM stats for NBA Players #48

Open sherabgashon opened 8 months ago

sherabgashon commented 8 months ago

Is there any way to incorporate FGA, FGM, FTA and FTM stats into the league.player_stats method for NBA fantasy leagues?

I am currently trying to aggregate team stats based on team's current rosters. Only FG% and FT% are displayed. Averaging these out would lead to inaccurate team values for team FG% and FT%.

I would like to know if it is possible to retrieve these values, or if there is a workaround to this.

Thank you!

Doddy-codes commented 6 months ago

Bump, this would be very helpful.

@sherabgashon If you are still looking this can be retrieved via the nba_api Python package (https://github.com/swar/nba_api):

from nba_api.stats.endpoints import leaguegamelog stats = leaguegamelog.LeagueGameLog(player_or_team_abbreviation='P') player_stats_df = stats.get_data_frames()[0]