def get_team_frame(game_frame, team, home, away):
    """Calculate statistics for each team.

    Parameters
    ----------
    game_frame : pandas.DataFrame
        The game frame for a given season.
    team : str
        The team abbreviation.
    home : str
        The label of the home team column.
    away : int
        The label of the away team column.

    Returns
    -------
    team_frame : pandas.DataFrame
        The extracted team frame.

    """
    team_frame = game_frame[(game_frame[home] == team) | (game_frame[away] ==
        team)]
    return team_frame
