sportsref/nfl/teams.py
def schedule(self, year):
        """Returns a DataFrame with schedule information for the given year.

        :year: The year for the season in question.
        :returns: Pandas DataFrame with schedule information.
        """
        doc = self.get_year_doc(year)
        table = doc('table#games')
        df = sportsref.utils.parse_table(table)
        if df.empty:
            return pd.DataFrame()
        df = df.loc[df['week_num'].notnull()]
        df['week_num'] = np.arange(len(df)) + 1
        df['is_win'] = df['game_outcome'] == 'W'
        df['is_loss'] = df['game_outcome'] == 'L'
        df['is_tie'] = df['game_outcome'] == 'T'
        df['is_bye'] = df['game_outcome'].isnull()
        df['is_ot'] = df['overtime'].notnull()
        return df
def schedule(self, year):
        """Returns a DataFrame with schedule information for the given year.

        :year: The year for the season in question.
        :returns: Pandas DataFrame with schedule information.
        """
        doc = self.get_year_doc(year)
        table = doc('table#games')
        df = sportsref.utils.parse_table(table)
        if df.empty:
            return pd.DataFrame()
        df = df.loc[df['week_num'].notnull()]
        df['week_num'] = np.arange(len(df)) + 1
        df['is_win'] = df['game_outcome'] == 'W'
        df['is_loss'] = df['game_outcome'] == 'L'
        df['is_tie'] = df['game_outcome'] == 'T'
        df['is_bye'] = df['game_outcome'].isnull()
        df['is_ot'] = df['overtime'].notnull()
        return df
def schedule ( self , year ) : doc = self . get_year_doc ( year ) table = doc ( 'table#games' ) df = sportsref . utils . parse_table ( table ) if df . empty : return pd . DataFrame ( ) df = df . loc [ df [ 'week_num' ] . notnull ( ) ] df [ 'week_num' ] = np . arange ( len ( df ) ) + 1 df [ 'is_win' ] = df [ 'game_outcome' ] == 'W' df [ 'is_loss' ] = df [ 'game_outcome' ] == 'L' df [ 'is_tie' ] = df [ 'game_outcome' ] == 'T' df [ 'is_bye' ] = df [ 'game_outcome' ] . isnull ( ) df [ 'is_ot' ] = df [ 'overtime' ] . notnull ( ) return df
Returns a DataFrame with schedule information for the given year.

        :year: The year for the season in question.
        :returns: Pandas DataFrame with schedule information.
Returns a DataFrame with schedule information for the given year .