sportsref/nfl/boxscores.py
def snap_counts(self):
        """Gets the snap counts for both teams' players and returns them in a
        DataFrame. Note: only goes back to 2012.

        :returns: DataFrame of snap count data
        """
        # TODO: combine duplicate players, see 201312150mia - ThomDa03
        doc = self.get_doc()
        table_ids = ('vis_snap_counts', 'home_snap_counts')
        tms = (self.away(), self.home())
        df = pd.concat([
            sportsref.utils.parse_table(doc('table#{}'.format(table_id)))
            .assign(is_home=bool(i), team=tms[i], opp=tms[i*-1+1])
            for i, table_id in enumerate(table_ids)
        ])
        if df.empty:
            return df
        return df.set_index('player_id')
def snap_counts(self):
        """Gets the snap counts for both teams' players and returns them in a
        DataFrame. Note: only goes back to 2012.

        :returns: DataFrame of snap count data
        """
        # TODO: combine duplicate players, see 201312150mia - ThomDa03
        doc = self.get_doc()
        table_ids = ('vis_snap_counts', 'home_snap_counts')
        tms = (self.away(), self.home())
        df = pd.concat([
            sportsref.utils.parse_table(doc('table#{}'.format(table_id)))
            .assign(is_home=bool(i), team=tms[i], opp=tms[i*-1+1])
            for i, table_id in enumerate(table_ids)
        ])
        if df.empty:
            return df
        return df.set_index('player_id')
Gets the snap counts for both teams' players and returns them in a
        DataFrame. Note: only goes back to 2012.

        :returns: DataFrame of snap count data