pro_football_reference_web_scraper package

Submodules

pro_football_reference_web_scraper.player_game_log module

player_game_log.get_player_game_log(player: str, position: str, season: int) DataFrame

A function to retrieve a player’s game log in a given season.

Returns a pandas DataFrame of a NFL player’s game log in a given season, including position-specific statistics.

Parameters:
  • player (str) – A NFL player’s full name, as it appears on Pro Football Reference

  • position (str) – The position the player plays. Must be ‘QB’, ‘RB’, ‘WR’, or ‘TE’

  • season (int) – The season of the game log you are trying to retrieve

Returns:

Each game is a row of the DataFrame

Return type:

pandas.DataFrame

pro_football_reference_web_scraper.team_game_log module

team_game_log.get_team_game_log(team: str, season: int) DataFrame

A function to retrieve a team’s game log in a given season.

Returns a pandas DataFrame of a NFL team’s game log in a given season, including relevant team-level statistics.

Parameters:
  • team (str) – A NFL team’s name, as it appears on Pro Football Reference

  • season (int) – The season of the game log you are trying to retrieve

Returns:

Each game is a row of the DataFrame

Return type:

pandas.DataFrame

pro_football_reference_web_scraper.player_splits module

player_splits.home_road(player: str, position: str, season: int, avg=True) DataFrame

A function that returns a player’s home-road splits in a given season

Returns a pandas DataFrame of a player’s stats at home vs. on the road

Parameters:
  • player (str) – A NFL player’s full name, as it appears on Pro Football Reference

  • position (str) – The position the player plays. Must be ‘QB’, ‘RB’, ‘WR’, or ‘TE’

  • season (int) – The season of the stats you are trying to retrieve

  • avg (bool) – Whether you want the stats as averages or sums (default = True)

Returns:

A pandas DataFrame of a player’s home-road splits

Return type:

pandas.DataFrame

player_splits.win_loss(player: str, position: str, season: int, avg=True) DataFrame

A function that returns a player’s win-loss splits in a given season

Returns a pandas DataFrame of a player’s stats in wins vs. in losses

Parameters:
  • player (str) – A NFL player’s full name, as it appears on Pro Football Reference

  • position (str) – The position the player plays. Must be ‘QB’, ‘RB’, ‘WR’, or ‘TE’

  • season (int) – The season of the stats you are trying to retrieve

  • avg (bool) – Whether you want the stats as averages or sums

Returns:

A pandas DataFrame of a player’s win-loss splits

Return type:

pandas.DataFrame

pro_football_reference_web_scraper.team_splits module

team_splits.home_road(team: str, season: int, avg=True) DataFrame

A function that returns a team’s home-road splits in a given season

Returns a pandas DataFrame of a team’s stats at home vs. on the road

Parameters:
  • team (str) – A NFL team’s name, as it appears on Pro Football Reference

  • season (int) – The season of the stats you are trying to retrieve

  • avg (bool) – Whether you want the stats as averages or sums (default = True)

Returns:

A pandas DataFrame of a team’s home-road splits

Return type:

pandas.DataFrame

team_splits.win_loss(team: str, season: int, avg=True) DataFrame

A function that returns a team’s win-loss splits in a given season

Returns a pandas DataFrame of a player’s stats in wins vs. in losses

Parameters:
  • team (str) – A NFL team’s name, as it appears on Pro Football Reference

  • season (int) – The season of the stats you are trying to retrieve

  • avg (bool) – Whether you want the stats as averages or sums (default = True)

Returns:

A pandas DataFrame of a team’s win-loss splits

Return type:

pandas.DataFrame

Module contents