nfldb
nfldb copied to clipboard
Rookie stats: years_pro = none
I'm trying to get stats for rookie players, but many of them have years_pro return as 'none'. this is problematic because it means that if I search for years_pro__le=1, I'm missing a lot of players. I can't seem to search for a string, so does anyone have a fix or workaround?
Example:
q.game(season_year=2016)
q.player(last_name='Bosa')
for p in q.as_players():
print(p.years_pro)
also, I'm having trouble sorting. some searches return results in ascending order, and when I try to .sort('years_pro', 'desc').as_players() I get sort() takes exactly 2 arguments (3 given)
For each player you could find all their plays that match the season year of their first play in the db.