Skip to content

Conversation

@brandonhawi
Copy link
Contributor

Summary

This PR removes the PF (Personal Fouls) context measure from the ContextMeasureSimple class as it has been deprecated by the NBA.com API.

Issue

Fixes #600

Details

The NBA.com API endpoint for shotchartdetail no longer returns data when using PF as a context measure. Other context measures such as FGA, FGM, PTS, EFG_PCT, and TS_PCT continue to function correctly.

This appears to be a backend change by the NBA, as Personal Fouls are not a relevant metric for filtering shot chart data (which focuses on shooting statistics).

Changes

  • Removed pf = "PF" from the ContextMeasureSimple class in src/nba_api/stats/library/parameters.py

Testing

Users who were experiencing issues with the PF context measure returning no data should no longer be able to use this deprecated parameter, preventing confusion and API errors.

The NBA.com API no longer returns data when using "PF" (Personal Fouls) as a context measure for the shotchartdetail endpoint. Other context measures like FGA, FGM, and PTS continue to work correctly.

Fixes swar#600
@swar
Copy link
Owner

swar commented Jan 9, 2026

Okay so things we will need to validate:

  • Which endpoints are using ContextMeasure and confirm that PF is no longer supported in any of those endpoints.
  • Once validated, we can be safe to remove. If it fails validation, we'll need to rethink the structure of this parameter since I am not a big fan of how I set all the parameter stuff up originally.

If you are able to confirm that, we can start moving! I can help out with confirmation if needed, just let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

shotchartdetail issue - context measure "PF" no longer returns data

2 participants