I have a CSV file and a target vector. My aim is to calculate Euclidean distance with each row points from the target vector but I'm unable to perform this action because different errors have been occurring.
import os
import NumPy as np
from glob import glob
import matplotlib.pyplot as plt
import scipy
import tensorflow as tf
import math
import pandas as pd
import earthpy as et
from collections import Counter
# URL for .csv with avg monthly precip data
#avg_monthly_precip_url = "https://ndownloader.figshare.com/files/12710618"
#et.data.get_data(url=avg_monthly_precip_url)
#avg_monthly_precip_url = "https://ndownloader.figshare.com/files/12710618"
#et.data.get_data(url=avg_monthly_precip_url)
fname = os.path.join("dataset.csv")
avg_monthly_precip = pd.read_csv(fname)
print(avg_monthly_precip.describe())
AG = []
AG.append(avg_monthly_precip)
hj=[]
ap=avg_monthly_precip.iloc[0:1,0:4]
hj.append(ap)
p2=np.reshape(hj,(1,4))
print(p2)
Target vector = [70, 60, 59,10]
distance = math.sqrt( ((p1[0]-p2[0])**2)+((p1[1]-p2[1])**2)+((p1[2]-p2[2])**2)+((p1[3]-
p2[3])**2))
print(distance)