def get_probability_matrix(df):
    """
    :param df: DataFrame containing 'team', 'gameweek' and 'p_win' columns
    :returns: reshaped DataFrame with gameweeks as rows, teams as columns and values as probabilities
    """
    return df.set_index(['gameweek', 'team'])['p_win'].unstack()