def make_edge_data_table(profile_info,edge_data) :
    """
    Given the edge list and a specified set of
    user profiles we construct a dataframe containing
    the list of edges and the attributes of the nodes
    at each end of the respective edges.

    Parameters
    ------------

    profile_info : pandas dataframe

    Specified set of user profiles with corresponding user
    ids.

    edge_edge : pandas dataframe

    edge list in pandas dataframe format.

    Parameters
    ------------

    edge_data_with_info : pandas dataframe

    Each corresponds to an edge in the graph and
    contains te attributes of each of the users
    involved.

    """
    print("Merging edges and profile information...")

    edge_data_with_info = edge_data.merge(profile_info,left_on="id_1",right_on="user_id")
    edge_data_with_info = edge_data_with_info.merge(profile_info,left_on='id_2',right_on='user_id')
    edge_data_with_info=edge_data_with_info.drop(columns=['Unnamed: 0_x','Unnamed: 0_y','user_id_x','user_id_y'])
    edge_data_with_info.columns = ['id_1','id_2','gender_1','region_1','age_1','u1_lat','u1_lon','gender_2','region_2','age_2','u2_lat','u2_lon']

    return edge_data_with_info