def calculate_boxcar_rates(df):
    """
    Takes the given dataframe and makes the following calculations:

    - Divides col ending in GFON, iA2, iA1, and iG by one ending in TOI
    - Adds iG to iA1, calls result iP1
    - Adds iG and iA1 to iA2, calls result iP
    - Adds /60 to ends of iG, iA1, iP1, iA2, iP, and GFON

    :param df: dataframe

    :return: dataframe with columns changed as specified, and only those mentioned above selected.
    """

    # Select columns
    boxcars = df.filter(regex='\d{2}-game')
    cols_wanted = {'GFON', 'iA1', 'iA2', 'iG', 'TOION'}
    boxcars = boxcars.select(lambda colname: colname[colname.index(' ') + 1:] in cols_wanted, axis=1)

    # This is to help me select columns
    col_dict = {col[col.index(' ') + 1:]: col for col in boxcars.columns}

    # Transform
    for col in {'iG', 'iA1', 'iA2', 'GFON'}:
        boxcars.loc[:, col_dict[col]] = boxcars[col_dict[col]] / boxcars[col_dict['TOION']]

    prefix = col_dict['iG'][:col_dict['iG'].index(' ')]  # e.g. 25-game
    boxcars.loc[:, prefix + ' iP1'] = boxcars[col_dict['iG']] + boxcars[col_dict['iA1']]
    boxcars.loc[:, prefix + ' iP'] = boxcars[prefix + ' iP1'] + boxcars[col_dict['iA2']]

    # Rename
    renaming = {col: col + '/60' for col in boxcars.columns if col[-5:] != 'TOION'}
    boxcars.rename(columns=renaming, inplace=True)

    return boxcars