sportsref/nfl/players.py
def gamelog(self, year=None, kind='R'):
        """Gets the career gamelog of the given player.
        :kind: One of 'R', 'P', or 'B' (for regular season, playoffs, or both).
        Case-insensitive; defaults to 'R'.
        :year: The year for which the gamelog should be returned; if None,
        return entire career gamelog. Defaults to None.
        :returns: A DataFrame with the player's career gamelog.
        """
        url = self._subpage_url('gamelog', None)  # year is filtered later
        doc = pq(sportsref.utils.get_html(url))
        table = (doc('table#stats') if kind == 'R' else
                 doc('table#stats_playoffs'))
        df = sportsref.utils.parse_table(table)
        if year is not None:
            df = df.query('year == @year').reset_index(drop=True)
        return df
def gamelog(self, year=None, kind='R'):
        """Gets the career gamelog of the given player.
        :kind: One of 'R', 'P', or 'B' (for regular season, playoffs, or both).
        Case-insensitive; defaults to 'R'.
        :year: The year for which the gamelog should be returned; if None,
        return entire career gamelog. Defaults to None.
        :returns: A DataFrame with the player's career gamelog.
        """
        url = self._subpage_url('gamelog', None)  # year is filtered later
        doc = pq(sportsref.utils.get_html(url))
        table = (doc('table#stats') if kind == 'R' else
                 doc('table#stats_playoffs'))
        df = sportsref.utils.parse_table(table)
        if year is not None:
            df = df.query('year == @year').reset_index(drop=True)
        return df
def gamelog ( self , year = None , kind = 'R' ) : url = self . _subpage_url ( 'gamelog' , None ) # year is filtered later doc = pq ( sportsref . utils . get_html ( url ) ) table = ( doc ( 'table#stats' ) if kind == 'R' else doc ( 'table#stats_playoffs' ) ) df = sportsref . utils . parse_table ( table ) if year is not None : df = df . query ( 'year == @year' ) . reset_index ( drop = True ) return df
Gets the career gamelog of the given player.
        :kind: One of 'R', 'P', or 'B' (for regular season, playoffs, or both).
        Case-insensitive; defaults to 'R'.
        :year: The year for which the gamelog should be returned; if None,
        return entire career gamelog. Defaults to None.
        :returns: A DataFrame with the player's career gamelog.
Gets the career gamelog of the given player . : kind : One of R P or B ( for regular season playoffs or both ) . Case - insensitive ; defaults to R . : year : The year for which the gamelog should be returned ; if None return entire career gamelog . Defaults to None . : returns : A DataFrame with the player s career gamelog .