I'd like to check coordinates (x,y,z) from dataframe-1 (df1) to see if the location is close enough to an irregular surface that has its own coordinates (x,y,z) stored in dataframe-2 (df2). 

I'm able to go through each coordinate in df1, then loop through all coordinates in df2 and check it's distance. Then repeat for all coordinates in df1, but this would take sooooo long when I have over 1,000,000 coordinates in df1 to check.

I'm using pandas and wondering if it can be done without looping.

If coordinate in df1 is close to df2 then I want to select it and store it into df3.