def get_distance(distance_df, location_1, location_2):
    """
    Return distance value between two locations.

    Args:
        distance_df (pandas DataFrame) : distance dataframe
        location_1 (str)               : name of the first location
        location_2 (str)               : name of the second location

    Returns:
        float: Distance between two locations.
    """
    dist = float(distance_df[(distance_df.location_1 == location_1) & (distance_df.location_2 == location_2)].distance.values[0])
    if location_1 == location_2:
        dist = 0
    return dist