Last active
July 12, 2017 18:43
-
-
Save marcolussetti/3f71796494e8f9655b99287a6aa110cf to your computer and use it in GitHub Desktop.
NFL Player Info using nfldb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python2.7 | |
# Queries nfldb for the team & position of a player | |
import nfldb | |
import sys | |
db = nfldb.connect() | |
q = nfldb.Query(db) | |
if len(sys.argv) < 2: | |
argument = raw_input("Enter player name: ") | |
else: | |
argument = ' '.join(sys.argv[1:]) | |
q.player(full_name=argument) | |
for p in q.as_players(): | |
print p |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment