Skip to content

Commit

Permalink
add ability to import def pfr data
Browse files Browse the repository at this point in the history
  • Loading branch information
felixblochwitz committed Sep 17, 2024
1 parent 0cf8037 commit e9b492e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions nfl_data_py/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -916,8 +916,8 @@ def import_qbr(years=None, level='nfl', frequency='season'):


def __validate_pfr_inputs(s_type, years=None):
if s_type not in ('pass', 'rec', 'rush'):
raise ValueError('s_type variable must be one of "pass", "rec", or "rush".')
if s_type not in ('pass', 'rec', 'rush', 'def'):
raise ValueError('s_type variable must be one of "pass", "rec","rush", or "def.')

if years is None:
return []
Expand All @@ -939,7 +939,7 @@ def import_seasonal_pfr(s_type, years=None):
"""Import PFR advanced season-level statistics
Args:
s_type (str): must be one of pass, rec, rush
s_type (str): must be one of pass, rec, rush, def
years (List[int]): years to return data for, optional
Returns:
DataFrame
Expand All @@ -957,7 +957,7 @@ def import_weekly_pfr(s_type, years=None):
"""Import PFR advanced week-level statistics
Args:
s_type (str): must be one of pass, rec, rush
s_type (str): must be one of pass, rec, rush, def
years (List[int]): years to return data for, optional
Returns:
DataFrame
Expand Down

0 comments on commit e9b492e

Please sign in to comment.