title: Identifying similar XYZ points between two sets of lists
body: <p>I have two .csv files of XYZ points, A and B, where I want to find the closest matching XYZ point in B to each individual XYZ point in A and pair those two sets of points together. Both csv files have the same 'X', 'Y', 'Z' headers. </p>
  
  <p>My current method is to convert my csv files to lists and to use a for loop to loop through and calculate the distances between the two lists of XYZ values. </p>
  
  <p>My issue now is being able to actually pair the two sets of points together.</p>
  
  <p>Example Data: My actual data contains 1000s of points </p>
  
  <pre><code>A = [[-24.5, -12.5, 53.0],[-36.6, -32.5, 50.0],[-26.62, -13.5, 49.0]]
  B = [[-24, -12, 52],[-26, -13, 48], [-36, -33, 50], [49, 10, 53], [87, 59, 49]]
  
  match = []
  for x in A:
      for y in B:
          dist =abs(abs(x[0])-abs(y[0]))+abs(abs(x[1])-abs(y[1]))+abs(abs(x[2])-abs(y[2])
  
  </code></pre>
  
  <p>My ideal output would look something like this:</p>
  
  <pre><code>[-24.5, -12.5, 53] : [-24, -12, 52]
  [-36.6, -32.5, 50.0] : [-36, -33, 50]
  [-26.62, -13.5, 49.0] : [-26, -13, 50]
  </code></pre>
  
  <p>Am I going about this in the right way or is there a better way of doing this say in pandas?</p>
  
  <p>Thanks</p>