sportsref/nfl/finders/GPF.py
def GamePlayFinder(**kwargs):
    """ Docstring will be filled in by __init__.py """

    querystring = _kwargs_to_qs(**kwargs)
    url = '{}?{}'.format(GPF_URL, querystring)
    # if verbose, print url
    if kwargs.get('verbose', False):
        print(url)
    html = utils.get_html(url)
    doc = pq(html)

    # parse
    table = doc('table#all_plays')
    plays = utils.parse_table(table)

    # parse score column
    if 'score' in plays.columns:
        oScore, dScore = zip(*plays.score.apply(lambda s: s.split('-')))
        plays['teamScore'] = oScore
        plays['oppScore'] = dScore
    # add parsed pbp info
    if 'description' in plays.columns:
        plays = pbp.expand_details(plays, detailCol='description')

    return plays
def GamePlayFinder(**kwargs):
    """ Docstring will be filled in by __init__.py """

    querystring = _kwargs_to_qs(**kwargs)
    url = '{}?{}'.format(GPF_URL, querystring)
    # if verbose, print url
    if kwargs.get('verbose', False):
        print(url)
    html = utils.get_html(url)
    doc = pq(html)

    # parse
    table = doc('table#all_plays')
    plays = utils.parse_table(table)

    # parse score column
    if 'score' in plays.columns:
        oScore, dScore = zip(*plays.score.apply(lambda s: s.split('-')))
        plays['teamScore'] = oScore
        plays['oppScore'] = dScore
    # add parsed pbp info
    if 'description' in plays.columns:
        plays = pbp.expand_details(plays, detailCol='description')

    return plays
def GamePlayFinder ( * * kwargs ) : querystring = _kwargs_to_qs ( * * kwargs ) url = '{}?{}' . format ( GPF_URL , querystring ) # if verbose, print url if kwargs . get ( 'verbose' , False ) : print ( url ) html = utils . get_html ( url ) doc = pq ( html ) # parse table = doc ( 'table#all_plays' ) plays = utils . parse_table ( table ) # parse score column if 'score' in plays . columns : oScore , dScore = zip ( * plays . score . apply ( lambda s : s . split ( '-' ) ) ) plays [ 'teamScore' ] = oScore plays [ 'oppScore' ] = dScore # add parsed pbp info if 'description' in plays . columns : plays = pbp . expand_details ( plays , detailCol = 'description' ) return plays
Docstring will be filled in by __init__.py
Docstring will be filled in by __init__ . py