nflverse / nflverse/nflverse-data
[BUG] <team and opponent_team are NULL for one row in load_player_stats() (Steve Bono, 1999 week 9)>
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 396
- Forks
- 45
- PR merge metrics
- No merged PRs in 30d
Description
Is there an existing issue for this?
- I have searched the existing issues
Have you installed the latest development version of the package(s) in question?
- I have installed the latest development version of the package.
If this is a data issue, have you tried clearing your nflverse cache?
I am not using an nflverse R package (nflreadr, nflfastR) to access this data.
What version of the package do you have?
nflreadpy 0.1.5 (latest release on PyPI). Using the Python client, not the R packages.
Describe the bug
Exactly one row in load_player_stats(summary_level="week") has team and
opponent_team set to NULL: Steve Bono, 1999 week 9.
This appears to be the only occurrence in the dataset. I checked all 476,159
weekly rows across every position and every season from 1999 onward, and it is
the sole row with a null team.
game_id is populated: 1999_09_PHI_CAR. Bono was
on Carolina in 1999, making team = CAR and opponent_team = PHI.
I hit this because my ingest pipeline has a foreign key to a teams table, so the
row fails to load.
Reprex
import nflreadpy as nfl
import polars as pl
nfl.clear_cache()
w = nfl.load_player_stats(seasons=True, summary_level="week")
print(w.height)
# 476159
print(
w.filter(pl.col("team").is_null())
.select("player_id", "player_display_name", "position",
"season", "week", "game_id", "attempts")
)
# [{'player_id': '00-0001471', 'player_display_name': 'Steve Bono',
# 'position': 'QB', 'season': 1999, 'week': 9,
# 'game_id': '1999_09_PHI_CAR', 'attempts': 1}]
Expected Behavior
team should be CAR and opponent_team should be PHI.
nflverse_sitrep
N/A
Screenshots
Additional context
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the load_player_stats(summary_level="week") entry point and trace the source data for game_id 1999_09_PHI_CAR, player Steve Bono, in week 9 of 1999. Verify the row's team and opponent_team values, then rerun the provided Polars check to confirm they are CAR and PHI and that no affected null remains.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100