def distances():
  """
  Get all distances between all cities in miles (matrix-style). 

  Returns:
    dictionary of Backpage city names mapped to a list of distances, one for every other city
  """
  distances = {}
  # Instantiate a matrix of distances (in miles) between all cities
  num = 0
  top_row = 1
  fname = pkg_resources.resource_filename(__name__, 'resources/Distance_Matrix.csv')
  with open(fname, 'rU') as csvfile:
    reader = csv.reader(csvfile, delimiter = ',')
    for row in reader:
      if top_row == 1:
        top_row = 0
      else:
        # Map each city to a list of distances to all other cities.
        vals = []
        for item in row[1:]:
          if not item:
            continue
          try:
            vals.append(int(float(item)))
          except ValueError:
            print 'Invalid data type for row {} with value {}, column value: {}'.format(num, row[0], item)
        distances[num] = vals
        num += 1

  return distances
Get all distances between all cities in miles (matrix-style). 

  Returns:
    dictionary of Backpage city names mapped to a list of distances, one for every other city