sportsref/nfl/teams.py
def roster(self, year):
        """Returns the roster table for the given year.

        :year: The year for which we want the roster; defaults to current year.
        :returns: A DataFrame containing roster information for that year.
        """
        doc = self.get_year_doc('{}_roster'.format(year))
        roster_table = doc('table#games_played_team')
        df = sportsref.utils.parse_table(roster_table)
        starter_table = doc('table#starters')
        if not starter_table.empty:
            start_df = sportsref.utils.parse_table(starter_table)
            start_df = start_df.dropna(axis=0, subset=['position'])
            starters = start_df.set_index('position').player_id
            df['is_starter'] = df.player_id.isin(starters)
            df['starting_pos'] = df.player_id.map(
                lambda pid: (starters[starters == pid].index[0]
                             if pid in starters.values else None)
            )
        return df
def roster(self, year):
        """Returns the roster table for the given year.

        :year: The year for which we want the roster; defaults to current year.
        :returns: A DataFrame containing roster information for that year.
        """
        doc = self.get_year_doc('{}_roster'.format(year))
        roster_table = doc('table#games_played_team')
        df = sportsref.utils.parse_table(roster_table)
        starter_table = doc('table#starters')
        if not starter_table.empty:
            start_df = sportsref.utils.parse_table(starter_table)
            start_df = start_df.dropna(axis=0, subset=['position'])
            starters = start_df.set_index('position').player_id
            df['is_starter'] = df.player_id.isin(starters)
            df['starting_pos'] = df.player_id.map(
                lambda pid: (starters[starters == pid].index[0]
                             if pid in starters.values else None)
            )
        return df
Returns the roster table for the given year.

        :year: The year for which we want the roster; defaults to current year.
        :returns: A DataFrame containing roster information for that year.