sportsref/nfl/teams.py
def off_splits(self, year):
        """Returns a DataFrame of offensive team splits for a season.

        :year: int representing the season.
        :returns: Pandas DataFrame of split data.
        """
        doc = self.get_year_doc('{}_splits'.format(year))
        tables = doc('table.stats_table')
        dfs = [sportsref.utils.parse_table(table) for table in tables.items()]
        dfs = [
            df.assign(split=df.columns[0])
            .rename(columns={df.columns[0]: 'split_value'})
            for df in dfs
        ]
        if not dfs:
            return pd.DataFrame()
        return pd.concat(dfs).reset_index(drop=True)
def off_splits(self, year):
        doc = self.get_year_doc('{}_splits'.format(year))
        tables = doc('table.stats_table')
        dfs = [sportsref.utils.parse_table(table) for table in tables.items()]
        dfs = [
            df.assign(split=df.columns[0])
            .rename(columns={df.columns[0]: 'split_value'})
            for df in dfs
        ]
        if not dfs:
            return pd.DataFrame()
        return pd.concat(dfs).reset_index(drop=True)
def off_splits ( self , year ) : doc = self . get_year_doc ( '{}_splits' . format ( year ) ) tables = doc ( 'table.stats_table' ) dfs = [ sportsref . utils . parse_table ( table ) for table in tables . items ( ) ] dfs = [ df . assign ( split = df . columns [ 0 ] ) . rename ( columns = { df . columns [ 0 ] : 'split_value' } ) for df in dfs ] if not dfs : return pd . DataFrame ( ) return pd . concat ( dfs ) . reset_index ( drop = True )
Returns a DataFrame of offensive team splits for a season.

        :year: int representing the season.
        :returns: Pandas DataFrame of split data.
Returns a DataFrame of offensive team splits for a season .