0

I have a data frame with total 32 variables which are positions(Lat/Long) for different converters/machines. First 16 variables (X1 to X16) are latitude and next 16 (Y1 to Y16) are longitudes for differnet converters.

I want to create 16 new columns called 'avg_dist_' which is the average distance of a single converter/machine from the remaining 15 converters. So total 16 new columns(i.e., an average distance for all the 16) such as avg_dist_1,avg_dist_2,avg_dist_3,....etc.

I want to use newly created columns to find correlations with DV.

Pranav
  • 1
  • 1
  • 1
    Does this answer your question? [Haversine Formula in Python (Bearing and Distance between two GPS points)](https://stackoverflow.com/questions/4913349/haversine-formula-in-python-bearing-and-distance-between-two-gps-points) – The Myth Nov 03 '22 at 07:21

0 Answers0