You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use the SQL examples from the Wiki and get the following errors, did something in the API change that I'm missing?
Using the example from the Wiki (below),
`query = '''
SELECT
play_player.player_id, SUM(play_player.passing_yds) AS passing_yds
FROM play_player
LEFT JOIN game ON play_player.gsis_id = game.gsis_id
WHERE game.season_type = 'Regular' AND game.season_year = 2012
GROUP BY play_player.player_id
ORDER BY passing_yds DESC LIMIT 5
'''
players = []
with nfldb.Tx(db) as cursor:
cursor.execute(query)
for row in cursor.fetchall():
pp = nfldb.PlayPlayer(db, None, None, None, row['player_id'],
None, row)
players.append(pp)
for pp in players:
print pp.player_id, pp.passing_yds`
Returns the following:
TypeError Traceback (most recent call last)
in ()
13 for row in cursor.fetchall():
14 pp = nfldb.PlayPlayer(db, None, None, None, row['player_id'],
---> 15 None, row)
16 players.append(pp)
17
I'm trying to use the SQL examples from the Wiki and get the following errors, did something in the API change that I'm missing?
Using the example from the Wiki (below),
`query = '''
SELECT
play_player.player_id, SUM(play_player.passing_yds) AS passing_yds
FROM play_player
LEFT JOIN game ON play_player.gsis_id = game.gsis_id
WHERE game.season_type = 'Regular' AND game.season_year = 2012
GROUP BY play_player.player_id
ORDER BY passing_yds DESC LIMIT 5
'''
players = []
with nfldb.Tx(db) as cursor:
cursor.execute(query)
for row in cursor.fetchall():
pp = nfldb.PlayPlayer(db, None, None, None, row['player_id'],
None, row)
players.append(pp)
for pp in players:
print pp.player_id, pp.passing_yds`
Returns the following:
TypeError: init() takes exactly 2 arguments (8 given)
The text was updated successfully, but these errors were encountered: