-
Notifications
You must be signed in to change notification settings - Fork 270
Description
Sport
Football
Summary
I've noticed that the season average fantasy points for a player is only populated for free agents while players that are on teams show an avg_points of 0.0. Is there a way to get the average score for every player in the league?
Example code for reproduction. This will print the first player on the home team and the first free agent last week. For the home team player it should say the name and 0.0. For the free agent it will print the name and a non-zero number (although you may need to find a free agent that has a non zero average in case the first guy hasn't played at all)
week = league.current_week -1
matchups = league.box_scores(week)
player = matchups[0].home_lineup[0]
print(player.name,player.avg_points)
free_agents = league.free_agents(week=week,size =1000)
free_agent = free_agents[0]
print(free_agent.name,free_agent.avg_points)
Logs/Data
No response